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

Side by Side Diff: gm/drawfilter.cpp

Issue 1626543002: Add SK_SUPPORT_LEGACY_DRAWFILTER guard around calls to SkCanvas::(get|set)DrawFilter. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | tests/CanvasStateTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "gm.h" 8 #include "gm.h"
9 #include "SkBlurMask.h" 9 #include "SkBlurMask.h"
10 #include "SkBlurMaskFilter.h" 10 #include "SkBlurMaskFilter.h"
11 #include "SkCanvas.h" 11 #include "SkCanvas.h"
12 #include "SkDrawFilter.h" 12 #include "SkDrawFilter.h"
13 #include "SkPaint.h" 13 #include "SkPaint.h"
14 14
15 #ifdef SK_SUPPORT_LEGACY_DRAWFILTER
16
15 /** 17 /**
16 * Initial test coverage for SkDrawFilter. 18 * Initial test coverage for SkDrawFilter.
17 * Draws two rectangles; if draw filters are broken, they will match. 19 * Draws two rectangles; if draw filters are broken, they will match.
18 * If draw filters are working correctly, the first will be blue and blurred, 20 * If draw filters are working correctly, the first will be blue and blurred,
19 * the second red and sharp. 21 * the second red and sharp.
20 */ 22 */
21 23
22 namespace { 24 namespace {
23 class TestFilter : public SkDrawFilter { 25 class TestFilter : public SkDrawFilter {
24 public: 26 public:
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // Must unset if the DrawFilter is from the stack to avoid refcount erro rs! 65 // Must unset if the DrawFilter is from the stack to avoid refcount erro rs!
64 canvas->setDrawFilter(nullptr); 66 canvas->setDrawFilter(nullptr);
65 } 67 }
66 68
67 private: 69 private:
68 typedef GM INHERITED; 70 typedef GM INHERITED;
69 }; 71 };
70 72
71 DEF_GM( return new DrawFilterGM; ) 73 DEF_GM( return new DrawFilterGM; )
72 74
75 #endif
OLDNEW
« no previous file with comments | « no previous file | tests/CanvasStateTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698