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

Unified Diff: tests/WindowRectanglesTest.cpp

Issue 2312173002: Revert of Improve usage of window rectangles (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_drawsinreducedclip
Patch Set: Created 4 years, 3 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
« no previous file with comments | « tests/ProxyTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/WindowRectanglesTest.cpp
diff --git a/tests/WindowRectanglesTest.cpp b/tests/WindowRectanglesTest.cpp
index e9545651afd8b9fc90a1395c8c7340911aeb0afc..d569f1d7aa2320fdae27d3896e5cf9ec3a8819ec 100644
--- a/tests/WindowRectanglesTest.cpp
+++ b/tests/WindowRectanglesTest.cpp
@@ -31,6 +31,7 @@
GrWindowRectangles wr2(wr);
REPORTER_ASSERT(reporter, wr2 == wr);
+ REPORTER_ASSERT(reporter, wr2.mode() == wr.mode());
REPORTER_ASSERT(reporter, wr2.count() == wr.count());
REPORTER_ASSERT(reporter, !memcmp(wr2.data(), wr.data(), i * sizeof(SkIRect)));
@@ -71,6 +72,21 @@
REPORTER_ASSERT(reporter, !memcmp(A.data(), windowData,
GrWindowRectangles::kMaxWindows * sizeof(SkIRect)));
}
+
+ GrWindowRectangles wrI(GrWindowRectangles::Mode::kInclusive);
+ for (int i = 0; i < wr.count(); ++i) {
+ wrI.addWindow(windowData[i]);
+ }
+ REPORTER_ASSERT(reporter, wrI != wr);
+ REPORTER_ASSERT(reporter, wrI.mode() != wr.mode());
+ REPORTER_ASSERT(reporter, wrI.count() == wr.count());
+ REPORTER_ASSERT(reporter, !memcmp(wrI.data(), wr.data(), wr.count() * sizeof(SkIRect)));
+
+ wr.reset(GrWindowRectangles::Mode::kInclusive);
+ for (int i = 0; i < wrI.count(); ++i) {
+ wr.addWindow(windowData[i]);
+ }
+ REPORTER_ASSERT(reporter, wrI == wr);
}
#endif
« no previous file with comments | « tests/ProxyTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698