From b93ba45b58ad24e0e2cb75b842e24ff711c368b0 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Mon, 10 Mar 2014 19:47:58 +0000 Subject: 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 --- gm/canvasstate.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gm/canvasstate.cpp') diff --git a/gm/canvasstate.cpp b/gm/canvasstate.cpp index f2761da1cb..b61ee720d5 100644 --- a/gm/canvasstate.cpp +++ b/gm/canvasstate.cpp @@ -132,6 +132,7 @@ protected: // clear the canvas to red canvas->drawColor(SK_ColorRED); +#ifdef SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG // both rects should appear drawTestPattern(canvas, 255, SkCanvas::kARGB_NoClipLayer_SaveFlag); @@ -144,6 +145,7 @@ protected: // only the bottom rect should appear drawTestPattern(canvas, 0, SkCanvas::kARGB_NoClipLayer_SaveFlag); +#endif } virtual uint32_t onGetFlags() const SK_OVERRIDE { return kSkipGPU_Flag; } -- cgit v1.2.3