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

Unified Diff: tests/AAClipTest.cpp

Issue 560713002: Revert of Revert of allow canvas to force conservative clips (for speed) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 | « src/core/SkRecorder.cpp ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/AAClipTest.cpp
diff --git a/tests/AAClipTest.cpp b/tests/AAClipTest.cpp
index 776cd5267ab6a4a31022394072f78fe4cd462b2d..64e378455a751fb687757b2d75060940c59a2a08 100644
--- a/tests/AAClipTest.cpp
+++ b/tests/AAClipTest.cpp
@@ -371,6 +371,7 @@
static void did_dx_affect(skiatest::Reporter* reporter, const SkScalar dx[],
size_t count, bool changed) {
+ const SkISize baseSize = SkISize::Make(10, 10);
SkIRect ir = { 0, 0, 10, 10 };
for (size_t i = 0; i < count; ++i) {
@@ -381,11 +382,11 @@
SkRasterClip rc1(ir);
SkRasterClip rc2(ir);
- rc0.op(r, SkRegion::kIntersect_Op, false);
+ rc0.op(r, baseSize, SkRegion::kIntersect_Op, false);
r.offset(dx[i], 0);
- rc1.op(r, SkRegion::kIntersect_Op, true);
+ rc1.op(r, baseSize, SkRegion::kIntersect_Op, true);
r.offset(-2*dx[i], 0);
- rc2.op(r, SkRegion::kIntersect_Op, true);
+ rc2.op(r, baseSize, SkRegion::kIntersect_Op, true);
REPORTER_ASSERT(reporter, changed != (rc0 == rc1));
REPORTER_ASSERT(reporter, changed != (rc0 == rc2));
« no previous file with comments | « src/core/SkRecorder.cpp ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698