diff options
author | 2018-01-04 19:21:58 -0500 | |
---|---|---|
committer | 2018-01-05 00:42:14 +0000 | |
commit | 0ebf4192f18778df844767c31dab8d502d78684c (patch) | |
tree | 612e1551a7a521725d3c2de82dbc2168a0499443 /tests | |
parent | 54f3cda30cc6457793b3b5b0aed34c9b21aa49a4 (diff) |
[sksg] More inval fiddling
Node subclasses can now control whether their bounds (changes)
contribute to damage.
Tristate:
* Default: The node bounds contribute to damage if the node itself was
invalidated, observing hasSelfInval(). This is the default
behavior.
* ForceSelf: The node bounds contribute to damage, regardless of
hasSelfInval(). Used for domain-boundary nodes (e.g. Draw),
which gate blocked fragments (e.g. geometry, paint nodes).
* BlockSelf: The node bounds do not contribute to damage, regardless of
hasSelfInval(). Used for nodes which do not contribute
damage directly (e.g. paints, geometry).
TBR=
Change-Id: I7c941c7ea12e14b008d846ec13108e66e34dbc73
Reviewed-on: https://skia-review.googlesource.com/91104
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/SGTest.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/SGTest.cpp b/tests/SGTest.cpp index c4b95a7717..ca6c23d163 100644 --- a/tests/SGTest.cpp +++ b/tests/SGTest.cpp @@ -81,13 +81,12 @@ DEF_TEST(SGInvalidation, reporter) { { // Update the common color. - // TODO: this doesn't work ATM as expected; fix and enable. -// color->setColor(0xffff0000); -// std::vector<SkRect> damage = { {0, 0, 100, 100}, { 200, 100, 300, 200} }; -// check_inval(reporter, tr, -// SkRect::MakeWH(300, 200), -// SkRect::MakeWH(300, 200), -// &damage); + color->setColor(0xffff0000); + std::vector<SkRect> damage = { {0, 0, 100, 100}, { 200, 100, 300, 200} }; + check_inval(reporter, tr, + SkRect::MakeWH(300, 200), + SkRect::MakeWH(300, 200), + &damage); } { |