diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-03-10 19:47:58 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-03-10 19:47:58 +0000 |
commit | b93ba45b58ad24e0e2cb75b842e24ff711c368b0 (patch) | |
tree | 10ea8de391bbc7663cca97e66ac3a83a22537dcb /tests | |
parent | bf998240837d8798e0b257416ce8832250b64af6 (diff) |
flag to make kClipToLayer_SaveFlag the default behavior
#define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG to get the old behavior
The goal is to remove the feature of saveLayer that allows the canvas to draw outside of the top-most layer.
R=robertphillips@google.com, scroggo@google.com
Review URL: https://codereview.chromium.org/190723004
git-svn-id: http://skia.googlecode.com/svn/trunk@13730 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CanvasStateTest.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/CanvasStateTest.cpp b/tests/CanvasStateTest.cpp index 3c7552fce3..212b14ab3e 100644 --- a/tests/CanvasStateTest.cpp +++ b/tests/CanvasStateTest.cpp @@ -16,6 +16,7 @@ #include "Test.h" static void test_complex_layers(skiatest::Reporter* reporter) { +#ifdef SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG const int WIDTH = 400; const int HEIGHT = 400; const int SPACER = 10; @@ -87,12 +88,13 @@ static void test_complex_layers(skiatest::Reporter* reporter) { bitmaps[1].getPixels(), bitmaps[0].getSize())); } +#endif } //////////////////////////////////////////////////////////////////////////////// static void test_complex_clips(skiatest::Reporter* reporter) { - +#ifdef SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG const int WIDTH = 400; const int HEIGHT = 400; const int SPACER = 10; @@ -175,6 +177,7 @@ static void test_complex_clips(skiatest::Reporter* reporter) { REPORTER_ASSERT(reporter, !memcmp(bitmaps[0].getPixels(), bitmaps[1].getPixels(), bitmaps[0].getSize())); +#endif } //////////////////////////////////////////////////////////////////////////////// @@ -229,6 +232,7 @@ static void test_soft_clips(skiatest::Reporter* reporter) { } static void test_saveLayer_clip(skiatest::Reporter* reporter) { +#ifdef SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG const int WIDTH = 100; const int HEIGHT = 100; const int LAYER_WIDTH = 50; @@ -259,6 +263,7 @@ static void test_saveLayer_clip(skiatest::Reporter* reporter) { REPORTER_ASSERT(reporter, clipStackBounds.height() == LAYER_HEIGHT); canvas.restore(); +#endif } DEF_TEST(CanvasState, reporter) { |