OLD | NEW |
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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 108 |
109 class DeviceProxy : public Proxy { | 109 class DeviceProxy : public Proxy { |
110 public: | 110 public: |
111 DeviceProxy(SkBaseDevice* device) : fDevice(device) {} | 111 DeviceProxy(SkBaseDevice* device) : fDevice(device) {} |
112 | 112 |
113 SkBaseDevice* createDevice(int width, int height) override; | 113 SkBaseDevice* createDevice(int width, int height) override; |
114 | 114 |
115 // Returns true if the proxy handled the filter itself. If this returns | 115 // Returns true if the proxy handled the filter itself. If this returns |
116 // false then the filter's code will be called. | 116 // false then the filter's code will be called. |
117 bool filterImage(const SkImageFilter*, const SkBitmap& src, const SkImag
eFilter::Context&, | 117 bool filterImage(const SkImageFilter*, const SkBitmap& src, const SkImag
eFilter::Context&, |
118 SkBitmap* result, SkIPoint* offset) override; | 118 SkBitmap* result, SkIPoint* offset) override; |
119 | 119 |
120 private: | 120 private: |
121 SkBaseDevice* fDevice; | 121 SkBaseDevice* fDevice; |
122 }; | 122 }; |
123 | 123 |
124 /** | 124 /** |
125 * Request a new (result) image to be created from the src image. | 125 * Request a new (result) image to be created from the src image. |
126 * If the src has no pixels (isNull()) then the request just wants to | 126 * If the src has no pixels (isNull()) then the request just wants to |
127 * receive the config and width/height of the result. | 127 * receive the config and width/height of the result. |
128 * | 128 * |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 */ | 404 */ |
405 #define SK_IMAGEFILTER_UNFLATTEN_COMMON(localVar, expectedCount) \ | 405 #define SK_IMAGEFILTER_UNFLATTEN_COMMON(localVar, expectedCount) \ |
406 Common localVar; \ | 406 Common localVar; \ |
407 do { \ | 407 do { \ |
408 if (!localVar.unflatten(buffer, expectedCount)) { \ | 408 if (!localVar.unflatten(buffer, expectedCount)) { \ |
409 return NULL; \ | 409 return NULL; \ |
410 } \ | 410 } \ |
411 } while (0) | 411 } while (0) |
412 | 412 |
413 #endif | 413 #endif |
OLD | NEW |