diff options
author | reed <reed@chromium.org> | 2015-11-21 12:39:45 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-21 12:39:45 -0800 |
commit | c64eff55049b1192052b791549a32a03be1c43e3 (patch) | |
tree | c67123bfa168688123997d5f15696812a23fa923 /tests | |
parent | 0315dbcb554fe7f5fa80a81079fd8d2e61fc20e1 (diff) |
Revert[2] of "quick-accept clipRect calls"
This reverts commit ac8cabd729c75fdf774c0701b6ea7fd3ea5b9382.
BUG=skia:
TBR=
Review URL: https://codereview.chromium.org/1470563003
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CanvasStateTest.cpp | 10 |
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 |