chore: remove dead draggable region code (#38404)
This commit is contained in:
parent
b6c80ba646
commit
dec9a1d9db
3 changed files with 0 additions and 231 deletions
|
@ -4,28 +4,10 @@
|
|||
|
||||
#include "shell/browser/ui/drag_util.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "ui/gfx/geometry/skia_conversions.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
// Return a vector of non-draggable regions that fill a window of size
|
||||
// |width| by |height|, but leave gaps where the window should be draggable.
|
||||
std::vector<gfx::Rect> CalculateNonDraggableRegions(
|
||||
std::unique_ptr<SkRegion> draggable,
|
||||
int width,
|
||||
int height) {
|
||||
std::vector<gfx::Rect> result;
|
||||
SkRegion non_draggable;
|
||||
non_draggable.op({0, 0, width, height}, SkRegion::kUnion_Op);
|
||||
non_draggable.op(*draggable, SkRegion::kDifference_Op);
|
||||
for (SkRegion::Iterator it(non_draggable); !it.done(); it.next()) {
|
||||
result.push_back(gfx::SkIRectToRect(it.rect()));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// Convert draggable regions in raw format to SkRegion format.
|
||||
std::unique_ptr<SkRegion> DraggableRegionsToSkRegion(
|
||||
const std::vector<mojom::DraggableRegionPtr>& regions) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue