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

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

Issue 1169923002: remove Proxy entrypoints for canHandleFilter (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove flag Created 5 years, 6 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 | src/core/SkDeviceImageFilterProxy.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 2011 Google Inc. 2 * Copyright 2011 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 #ifndef SkImageFilter_DEFINED 8 #ifndef SkImageFilter_DEFINED
9 #define SkImageFilter_DEFINED 9 #define SkImageFilter_DEFINED
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 SkMatrix fCTM; 76 SkMatrix fCTM;
77 SkIRect fClipBounds; 77 SkIRect fClipBounds;
78 Cache* fCache; 78 Cache* fCache;
79 }; 79 };
80 80
81 class Proxy { 81 class Proxy {
82 public: 82 public:
83 virtual ~Proxy() {}; 83 virtual ~Proxy() {};
84 84
85 virtual SkBaseDevice* createDevice(int width, int height) = 0; 85 virtual SkBaseDevice* createDevice(int width, int height) = 0;
86 // returns true if the proxy can handle this filter natively
87 virtual bool canHandleImageFilter(const SkImageFilter*) = 0;
88 // returns true if the proxy handled the filter itself. if this returns 86 // returns true if the proxy handled the filter itself. if this returns
89 // false then the filter's code will be called. 87 // false then the filter's code will be called.
90 virtual bool filterImage(const SkImageFilter*, const SkBitmap& src, 88 virtual bool filterImage(const SkImageFilter*, const SkBitmap& src,
91 const Context&, 89 const Context&,
92 SkBitmap* result, SkIPoint* offset) = 0; 90 SkBitmap* result, SkIPoint* offset) = 0;
93 virtual const SkSurfaceProps* surfaceProps() const = 0; 91 virtual const SkSurfaceProps* surfaceProps() const = 0;
94 }; 92 };
95 93
96 /** 94 /**
97 * Request a new (result) image to be created from the src image. 95 * Request a new (result) image to be created from the src image.
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 */ 359 */
362 #define SK_IMAGEFILTER_UNFLATTEN_COMMON(localVar, expectedCount) \ 360 #define SK_IMAGEFILTER_UNFLATTEN_COMMON(localVar, expectedCount) \
363 Common localVar; \ 361 Common localVar; \
364 do { \ 362 do { \
365 if (!localVar.unflatten(buffer, expectedCount)) { \ 363 if (!localVar.unflatten(buffer, expectedCount)) { \
366 return NULL; \ 364 return NULL; \
367 } \ 365 } \
368 } while (0) 366 } while (0)
369 367
370 #endif 368 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkDeviceImageFilterProxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698