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

Side by Side Diff: include/core/SkCanvas.h

Issue 1618843002: Hide SkCanvas::{set,get}DrawFilter (Closed) Base URL: https://chromium.googlesource.com/skia.git@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 | « gyp/skia_for_android_framework_defines.gypi ('k') | include/utils/SkNWayCanvas.h » ('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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 #ifndef SkCanvas_DEFINED 8 #ifndef SkCanvas_DEFINED
9 #define SkCanvas_DEFINED 9 #define SkCanvas_DEFINED
10 10
(...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 * (e.g. it is recording into a picture) then the drawable will be referenc ed instead, 1142 * (e.g. it is recording into a picture) then the drawable will be referenc ed instead,
1143 * to have its draw() method called when the picture is finalized. 1143 * to have its draw() method called when the picture is finalized.
1144 * 1144 *
1145 * If the intent is to force the contents of the drawable into this canvas immediately, 1145 * If the intent is to force the contents of the drawable into this canvas immediately,
1146 * then drawable->draw(canvas) may be called. 1146 * then drawable->draw(canvas) may be called.
1147 */ 1147 */
1148 void drawDrawable(SkDrawable* drawable, const SkMatrix* = NULL); 1148 void drawDrawable(SkDrawable* drawable, const SkMatrix* = NULL);
1149 void drawDrawable(SkDrawable*, SkScalar x, SkScalar y); 1149 void drawDrawable(SkDrawable*, SkScalar x, SkScalar y);
1150 1150
1151 ////////////////////////////////////////////////////////////////////////// 1151 //////////////////////////////////////////////////////////////////////////
1152 #ifdef SK_INTERNAL
djsollen 2016/01/21 16:34:27 why do we need SK_INTERNAL?
f(malita) 2016/01/21 17:54:16 The intent is to only hide this for external users
1153 #ifndef SK_SUPPORT_LEGACY_DRAWFLTER
1154 #define SK_SUPPORT_LEGACY_DRAWFLTER
1155 #endif
1156 #endif
1152 1157
1158 #ifdef SK_SUPPORT_LEGACY_DRAWFLTER
1153 /** Get the current filter object. The filter's reference count is not 1159 /** Get the current filter object. The filter's reference count is not
1154 affected. The filter is saved/restored, just like the matrix and clip. 1160 affected. The filter is saved/restored, just like the matrix and clip.
1155 @return the canvas' filter (or NULL). 1161 @return the canvas' filter (or NULL).
1156 */ 1162 */
1163 SK_ATTR_EXTERNALLY_DEPRECATED("getDrawFilter use is deprecated")
1157 SkDrawFilter* getDrawFilter() const; 1164 SkDrawFilter* getDrawFilter() const;
1158 1165
1159 /** Set the new filter (or NULL). Pass NULL to clear any existing filter. 1166 /** Set the new filter (or NULL). Pass NULL to clear any existing filter.
1160 As a convenience, the parameter is returned. If an existing filter 1167 As a convenience, the parameter is returned. If an existing filter
1161 exists, its refcnt is decrement. If the new filter is not null, its 1168 exists, its refcnt is decrement. If the new filter is not null, its
1162 refcnt is incremented. The filter is saved/restored, just like the 1169 refcnt is incremented. The filter is saved/restored, just like the
1163 matrix and clip. 1170 matrix and clip.
1164 @param filter the new filter (or NULL) 1171 @param filter the new filter (or NULL)
1165 @return the new filter 1172 @return the new filter
1166 */ 1173 */
1174 SK_ATTR_EXTERNALLY_DEPRECATED("setDrawFilter use is deprecated")
1167 virtual SkDrawFilter* setDrawFilter(SkDrawFilter* filter); 1175 virtual SkDrawFilter* setDrawFilter(SkDrawFilter* filter);
1168 1176 #endif
1169 ////////////////////////////////////////////////////////////////////////// 1177 //////////////////////////////////////////////////////////////////////////
1170 1178
1171 /** 1179 /**
1172 * Return true if the current clip is empty (i.e. nothing will draw). 1180 * Return true if the current clip is empty (i.e. nothing will draw).
1173 * Note: this is not always a free call, so it should not be used 1181 * Note: this is not always a free call, so it should not be used
1174 * more often than necessary. However, once the canvas has computed this 1182 * more often than necessary. However, once the canvas has computed this
1175 * result, subsequent calls will be cheap (until the clip state changes, 1183 * result, subsequent calls will be cheap (until the clip state changes,
1176 * which can happen on any clip..() or restore() call. 1184 * which can happen on any clip..() or restore() call.
1177 */ 1185 */
1178 virtual bool isClipEmpty() const; 1186 virtual bool isClipEmpty() const;
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
1585 1593
1586 class SkCanvasClipVisitor { 1594 class SkCanvasClipVisitor {
1587 public: 1595 public:
1588 virtual ~SkCanvasClipVisitor(); 1596 virtual ~SkCanvasClipVisitor();
1589 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; 1597 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0;
1590 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; 1598 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0;
1591 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; 1599 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0;
1592 }; 1600 };
1593 1601
1594 #endif 1602 #endif
OLDNEW
« no previous file with comments | « gyp/skia_for_android_framework_defines.gypi ('k') | include/utils/SkNWayCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698