Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Unified Diff: tests/ClipStackTest.cpp

Issue 2244223004: Make GrReducedClip's gen ID only apply to the element list (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix GrReducedClip::fGenID to be kEmpty/kWideOpen when appropriate Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/gpu/GrReducedClip.cpp ('K') | « src/gpu/GrReducedClip.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ClipStackTest.cpp
diff --git a/tests/ClipStackTest.cpp b/tests/ClipStackTest.cpp
index 5265ac2c670a97c06f9044339020b90ec1196d7c..1b096588c3a0ed6a5849fda73830dafc4e9e0951 100644
--- a/tests/ClipStackTest.cpp
+++ b/tests/ClipStackTest.cpp
@@ -1196,6 +1196,8 @@ static void test_aa_query(skiatest::Reporter* reporter, const SkString& testName
switch (expectedMethod) {
case ClipMethod::kSkipDraw:
SkASSERT(0 == numExpectedElems);
+ REPORTER_ASSERT_MESSAGE(reporter, SkClipStack::kEmptyGenID == reduced.genID(),
+ testName.c_str());
REPORTER_ASSERT_MESSAGE(reporter, reduced.elements().isEmpty(), testName.c_str());
REPORTER_ASSERT_MESSAGE(reporter,
GrReducedClip::InitialState::kAllOut == reduced.initialState(),
@@ -1203,6 +1205,9 @@ static void test_aa_query(skiatest::Reporter* reporter, const SkString& testName
return;
case ClipMethod::kIgnoreClip:
SkASSERT(0 == numExpectedElems);
+ SkASSERT(SkClipStack::kWideOpenGenID == reduced.genID());
+ REPORTER_ASSERT_MESSAGE(reporter, SkClipStack::kWideOpenGenID == reduced.genID(),
+ testName.c_str());
REPORTER_ASSERT_MESSAGE(reporter,
!reduced.hasIBounds() ||
GrClip::IsInsideClip(reduced.ibounds(), queryBounds),
« src/gpu/GrReducedClip.cpp ('K') | « src/gpu/GrReducedClip.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698