fix: default offset when no drag regions (#27147)

This commit is contained in:
Shelley Vohr 2021-01-04 14:01:32 -08:00 committed by GitHub
parent 3455136e9d
commit 6307b52dc5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 5 deletions

View file

@ -32,8 +32,8 @@ std::unique_ptr<SkRegion> DraggableRegionsToSkRegion(
auto sk_region = std::make_unique<SkRegion>();
for (const auto& region : regions) {
sk_region->op(
{region->bounds.x(), region->bounds.y(), region->bounds.right(),
region->bounds.bottom()},
SkIRect::MakeLTRB(region->bounds.x(), region->bounds.y(),
region->bounds.right(), region->bounds.bottom()),
region->draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op);
}
return sk_region;