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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 * should be used to offset access to the input images, and should also | 163 * should be used to offset access to the input images, and should also |
164 * be added to the "offset" parameter in onFilterImage and | 164 * be added to the "offset" parameter in onFilterImage and |
165 * filterImageGPU(). (The latter ensures that the resulting buffer is | 165 * filterImageGPU(). (The latter ensures that the resulting buffer is |
166 * drawn in the correct location.) | 166 * drawn in the correct location.) |
167 */ | 167 */ |
168 bool cropRectIsSet() const { return fCropRect.flags() != 0x0; } | 168 bool cropRectIsSet() const { return fCropRect.flags() != 0x0; } |
169 | 169 |
170 // Default impl returns union of all input bounds. | 170 // Default impl returns union of all input bounds. |
171 virtual void computeFastBounds(const SkRect&, SkRect*) const; | 171 virtual void computeFastBounds(const SkRect&, SkRect*) const; |
172 | 172 |
173 #ifdef SK_SUPPORT_GPU | 173 #if SK_SUPPORT_GPU |
174 /** | 174 /** |
175 * Wrap the given texture in a texture-backed SkBitmap. | 175 * Wrap the given texture in a texture-backed SkBitmap. |
176 */ | 176 */ |
177 static void WrapTexture(GrTexture* texture, int width, int height, SkBitmap*
result); | 177 static void WrapTexture(GrTexture* texture, int width, int height, SkBitmap*
result); |
178 | 178 |
179 /** | 179 /** |
180 * Recursively evaluate this filter on the GPU. If the filter has no GPU | 180 * Recursively evaluate this filter on the GPU. If the filter has no GPU |
181 * implementation, it will be processed in software and uploaded to the GPU. | 181 * implementation, it will be processed in software and uploaded to the GPU. |
182 */ | 182 */ |
183 bool getInputResultGPU(SkImageFilter::Proxy* proxy, const SkBitmap& src, con
st Context&, | 183 bool getInputResultGPU(SkImageFilter::Proxy* proxy, const SkBitmap& src, con
st Context&, |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 const SkIRect& bounds) const; | 287 const SkIRect& bounds) const; |
288 | 288 |
289 private: | 289 private: |
290 typedef SkFlattenable INHERITED; | 290 typedef SkFlattenable INHERITED; |
291 int fInputCount; | 291 int fInputCount; |
292 SkImageFilter** fInputs; | 292 SkImageFilter** fInputs; |
293 CropRect fCropRect; | 293 CropRect fCropRect; |
294 }; | 294 }; |
295 | 295 |
296 #endif | 296 #endif |
OLD | NEW |