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

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

Issue 148883011: Make SkImageFilter methods const. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: More fixes to gm/ Created 6 years, 10 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 | « gm/imagefiltersgraph.cpp ('k') | include/core/SkDevice.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 /* 2 /*
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #ifndef SkBitmapDevice_DEFINED 9 #ifndef SkBitmapDevice_DEFINED
10 #define SkBitmapDevice_DEFINED 10 #define SkBitmapDevice_DEFINED
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 */ 220 */
221 virtual void lockPixels() SK_OVERRIDE; 221 virtual void lockPixels() SK_OVERRIDE;
222 virtual void unlockPixels() SK_OVERRIDE; 222 virtual void unlockPixels() SK_OVERRIDE;
223 223
224 /** 224 /**
225 * Returns true if the device allows processing of this imagefilter. If 225 * Returns true if the device allows processing of this imagefilter. If
226 * false is returned, then the filter is ignored. This may happen for 226 * false is returned, then the filter is ignored. This may happen for
227 * some subclasses that do not support pixel manipulations after drawing 227 * some subclasses that do not support pixel manipulations after drawing
228 * has occurred (e.g. printing). The default implementation returns true. 228 * has occurred (e.g. printing). The default implementation returns true.
229 */ 229 */
230 virtual bool allowImageFilter(SkImageFilter*) SK_OVERRIDE; 230 virtual bool allowImageFilter(const SkImageFilter*) SK_OVERRIDE;
231 231
232 /** 232 /**
233 * Override and return true for filters that the device can handle 233 * Override and return true for filters that the device can handle
234 * intrinsically. Doing so means that SkCanvas will pass-through this 234 * intrinsically. Doing so means that SkCanvas will pass-through this
235 * filter to drawSprite and drawDevice (and potentially filterImage). 235 * filter to drawSprite and drawDevice (and potentially filterImage).
236 * Returning false means the SkCanvas will have apply the filter itself, 236 * Returning false means the SkCanvas will have apply the filter itself,
237 * and just pass the resulting image to the device. 237 * and just pass the resulting image to the device.
238 */ 238 */
239 virtual bool canHandleImageFilter(SkImageFilter*) SK_OVERRIDE; 239 virtual bool canHandleImageFilter(const SkImageFilter*) SK_OVERRIDE;
240 240
241 /** 241 /**
242 * Related (but not required) to canHandleImageFilter, this method returns 242 * Related (but not required) to canHandleImageFilter, this method returns
243 * true if the device could apply the filter to the src bitmap and return 243 * true if the device could apply the filter to the src bitmap and return
244 * the result (and updates offset as needed). 244 * the result (and updates offset as needed).
245 * If the device does not recognize or support this filter, 245 * If the device does not recognize or support this filter,
246 * it just returns false and leaves result and offset unchanged. 246 * it just returns false and leaves result and offset unchanged.
247 */ 247 */
248 virtual bool filterImage(SkImageFilter*, const SkBitmap&, const SkMatrix&, 248 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, const SkMatr ix&,
249 SkBitmap* result, SkIPoint* offset) SK_OVERRIDE; 249 SkBitmap* result, SkIPoint* offset) SK_OVERRIDE;
250 250
251 private: 251 private:
252 friend class SkCanvas; 252 friend class SkCanvas;
253 friend struct DeviceCM; //for setMatrixClip 253 friend struct DeviceCM; //for setMatrixClip
254 friend class SkDraw; 254 friend class SkDraw;
255 friend class SkDrawIter; 255 friend class SkDrawIter;
256 friend class SkDeviceFilteredPaint; 256 friend class SkDeviceFilteredPaint;
257 friend class SkDeviceImageFilterProxy; 257 friend class SkDeviceImageFilterProxy;
258 258
(...skipping 19 matching lines...) Expand all
278 virtual void flush() SK_OVERRIDE {} 278 virtual void flush() SK_OVERRIDE {}
279 279
280 virtual SkSurface* newSurface(const SkImageInfo&) SK_OVERRIDE; 280 virtual SkSurface* newSurface(const SkImageInfo&) SK_OVERRIDE;
281 281
282 SkBitmap fBitmap; 282 SkBitmap fBitmap;
283 283
284 typedef SkBaseDevice INHERITED; 284 typedef SkBaseDevice INHERITED;
285 }; 285 };
286 286
287 #endif // SkBitmapDevice_DEFINED 287 #endif // SkBitmapDevice_DEFINED
OLDNEW
« no previous file with comments | « gm/imagefiltersgraph.cpp ('k') | include/core/SkDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698