From 0ebf4192f18778df844767c31dab8d502d78684c Mon Sep 17 00:00:00 2001 From: Florin Malita Date: Thu, 4 Jan 2018 19:21:58 -0500 Subject: [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 Commit-Queue: Florin Malita --- tests/SGTest.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'tests/SGTest.cpp') 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 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 damage = { {0, 0, 100, 100}, { 200, 100, 300, 200} }; + check_inval(reporter, tr, + SkRect::MakeWH(300, 200), + SkRect::MakeWH(300, 200), + &damage); } { -- cgit v1.2.3