aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar reed <reed@chromium.org>2015-11-21 12:39:45 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-11-21 12:39:45 -0800
commitc64eff55049b1192052b791549a32a03be1c43e3 (patch)
treec67123bfa168688123997d5f15696812a23fa923 /tests
parent0315dbcb554fe7f5fa80a81079fd8d2e61fc20e1 (diff)
Revert[2] of "quick-accept clipRect calls"
Diffstat (limited to 'tests')
-rw-r--r--tests/CanvasStateTest.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/CanvasStateTest.cpp b/tests/CanvasStateTest.cpp
index b5543a1523..4f5fb463e3 100644
--- a/tests/CanvasStateTest.cpp
+++ b/tests/CanvasStateTest.cpp
@@ -322,8 +322,14 @@ DEF_TEST(CanvasState_test_saveLayer_clip, reporter) {
SkRect clipStackBounds;
SkClipStack::BoundsType boundsType;
canvas.getClipStack()->getBounds(&clipStackBounds, &boundsType);
- REPORTER_ASSERT(reporter, clipStackBounds.width() == WIDTH);
- REPORTER_ASSERT(reporter, clipStackBounds.height() == HEIGHT);
+ // The clip stack will return its bounds, or it may be "full" : i.e. empty + inside_out.
+ // Either result is consistent with this test, since the canvas' size is WIDTH/HEIGHT
+ if (SkClipStack::kInsideOut_BoundsType == boundsType) {
+ REPORTER_ASSERT(reporter, clipStackBounds.isEmpty());
+ } else {
+ REPORTER_ASSERT(reporter, clipStackBounds.width() == WIDTH);
+ REPORTER_ASSERT(reporter, clipStackBounds.height() == HEIGHT);
+ }
canvas.restore();
// Check that saveLayer with the kClipToLayer_SaveFlag sets the clip