| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 /** | 84 /** |
| 85 * Returns true if the filter can be expressed a single-pass | 85 * Returns true if the filter can be expressed a single-pass |
| 86 * GrEffect, used to process this filter on the GPU, or false if | 86 * GrEffect, used to process this filter on the GPU, or false if |
| 87 * not. | 87 * not. |
| 88 * | 88 * |
| 89 * If effect is non-NULL, a new GrEffect instance is stored | 89 * If effect is non-NULL, a new GrEffect instance is stored |
| 90 * in it. The caller assumes ownership of the stage, and it is up to the | 90 * in it. The caller assumes ownership of the stage, and it is up to the |
| 91 * caller to unref it. | 91 * caller to unref it. |
| 92 * | 92 * |
| 93 * The effect can assume its vertexCoords space maps 1-to-1 with texels | 93 * The effect can assume its vertexCoords space maps 1-to-1 with texels |
| 94 * in the texture. | 94 * in the texture. "offset" is the delta between the source and |
| 95 * destination rect's origins, when cropped processing is being performed. |
| 95 */ | 96 */ |
| 96 virtual bool asNewEffect(GrEffectRef** effect, GrTexture*) const; | 97 virtual bool asNewEffect(GrEffectRef** effect, GrTexture*, const SkIPoint& o
ffset) const; |
| 97 | 98 |
| 98 /** | 99 /** |
| 99 * Returns true if the filter can be processed on the GPU. This is most | 100 * Returns true if the filter can be processed on the GPU. This is most |
| 100 * often used for multi-pass effects, where intermediate results must be | 101 * often used for multi-pass effects, where intermediate results must be |
| 101 * rendered to textures. For single-pass effects, use asNewEffect(). | 102 * rendered to textures. For single-pass effects, use asNewEffect(). |
| 102 * The default implementation returns asNewEffect(NULL, NULL). | 103 * The default implementation returns asNewEffect(NULL, NULL). |
| 103 */ | 104 */ |
| 104 virtual bool canFilterImageGPU() const; | 105 virtual bool canFilterImageGPU() const; |
| 105 | 106 |
| 106 /** | 107 /** |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 bool applyCropRect(SkIRect* rect) const; | 177 bool applyCropRect(SkIRect* rect) const; |
| 177 | 178 |
| 178 private: | 179 private: |
| 179 typedef SkFlattenable INHERITED; | 180 typedef SkFlattenable INHERITED; |
| 180 int fInputCount; | 181 int fInputCount; |
| 181 SkImageFilter** fInputs; | 182 SkImageFilter** fInputs; |
| 182 SkIRect fCropRect; | 183 SkIRect fCropRect; |
| 183 }; | 184 }; |
| 184 | 185 |
| 185 #endif | 186 #endif |
| OLD | NEW |