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

Side by Side Diff: src/core/SkDeviceImageFilterProxy.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 | « src/core/SkBitmapDevice.cpp ('k') | src/core/SkImageFilter.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 2012 The Android Open Source Project 2 * Copyright 2012 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 SkDeviceImageFilterProxy_DEFINED 8 #ifndef SkDeviceImageFilterProxy_DEFINED
9 #define SkDeviceImageFilterProxy_DEFINED 9 #define SkDeviceImageFilterProxy_DEFINED
10 10
11 #include "SkImageFilter.h" 11 #include "SkImageFilter.h"
12 12
13 class SkDeviceImageFilterProxy : public SkImageFilter::Proxy { 13 class SkDeviceImageFilterProxy : public SkImageFilter::Proxy {
14 public: 14 public:
15 SkDeviceImageFilterProxy(SkBaseDevice* device) : fDevice(device) {} 15 SkDeviceImageFilterProxy(SkBaseDevice* device) : fDevice(device) {}
16 16
17 virtual SkBaseDevice* createDevice(int w, int h) SK_OVERRIDE { 17 virtual SkBaseDevice* createDevice(int w, int h) SK_OVERRIDE {
18 return fDevice->createCompatibleDevice(SkBitmap::kARGB_8888_Config, 18 return fDevice->createCompatibleDevice(SkBitmap::kARGB_8888_Config,
19 w, h, false); 19 w, h, false);
20 } 20 }
21 virtual bool canHandleImageFilter(SkImageFilter* filter) SK_OVERRIDE { 21 virtual bool canHandleImageFilter(const SkImageFilter* filter) SK_OVERRIDE {
22 return fDevice->canHandleImageFilter(filter); 22 return fDevice->canHandleImageFilter(filter);
23 } 23 }
24 virtual bool filterImage(SkImageFilter* filter, const SkBitmap& src, 24 virtual bool filterImage(const SkImageFilter* filter, const SkBitmap& src,
25 const SkMatrix& ctm, 25 const SkMatrix& ctm,
26 SkBitmap* result, SkIPoint* offset) SK_OVERRIDE { 26 SkBitmap* result, SkIPoint* offset) SK_OVERRIDE {
27 return fDevice->filterImage(filter, src, ctm, result, offset); 27 return fDevice->filterImage(filter, src, ctm, result, offset);
28 } 28 }
29 29
30 private: 30 private:
31 SkBaseDevice* fDevice; 31 SkBaseDevice* fDevice;
32 }; 32 };
33 33
34 #endif 34 #endif
OLDNEW
« no previous file with comments | « src/core/SkBitmapDevice.cpp ('k') | src/core/SkImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698