-
Notifications
You must be signed in to change notification settings - Fork 6k
Use DisplayListMatrixClipTracker in DisplayListBuilder #38349
Changes from 3 commits
0b94e62
b201dad
d71c31c
88aa3ce
24c72bd
0810362
0aee025
c6f674c
9a6e830
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -183,6 +183,19 @@ void DisplayListMatrixClipTracker::clipRRect(const SkRRect& rrect, | |
| void DisplayListMatrixClipTracker::clipPath(const SkPath& path, | ||
| SkClipOp op, | ||
| bool is_aa) { | ||
| // Map "kDifference of inverse path" to "kIntersect of the original path" and | ||
| // map "kIntersect of inverse path" to "kDifference of the original path" | ||
| if (path.isInverseFillType()) { | ||
| switch (op) { | ||
| case SkClipOp::kIntersect: | ||
| op = SkClipOp::kDifference; | ||
| break; | ||
| case SkClipOp::kDifference: | ||
| op = SkClipOp::kIntersect; | ||
| break; | ||
| } | ||
| } | ||
|
|
||
| SkRect bounds; | ||
| switch (op) { | ||
| case SkClipOp::kIntersect: | ||
|
|
@@ -323,7 +336,9 @@ SkRect Data3x3::local_cull_rect() const { | |
| // cull rect. | ||
| return DisplayListBuilder::kMaxCullRect; | ||
| } | ||
| return inverse.mapRect(cull_rect_); | ||
| SkRect expended_rect; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about the version in Data4x4?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is dubious, btw, because we could be computing local bounds for something that won't yet have its final transform, so the roundOut may be too much or not enough depending on a scale that happens outside the picture recording...
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is roundOut logic in DLBuilder. If it is not change here, some tests in display_list_unittests.cc and canvas_test.dart will fail. So we should change the tests instead of add roundOut here, right? |
||
| cull_rect_.roundOut(&expended_rect); | ||
| return inverse.mapRect(expended_rect); | ||
| } | ||
|
|
||
| } // namespace flutter | ||
Uh oh!
There was an error while loading. Please reload this page.