| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 SkRectShaderImageFilter_DEFINED | 8 #ifndef SkRectShaderImageFilter_DEFINED |
| 9 #define SkRectShaderImageFilter_DEFINED | 9 #define SkRectShaderImageFilter_DEFINED |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 * ref'ed by the new image filter. | 23 * ref'ed by the new image filter. |
| 24 * @param rect Rectangle of output pixels in which to apply the shader. | 24 * @param rect Rectangle of output pixels in which to apply the shader. |
| 25 * If NULL or a given crop edge is not specified, the source | 25 * If NULL or a given crop edge is not specified, the source |
| 26 * primitive's bounds are used instead. | 26 * primitive's bounds are used instead. |
| 27 */ | 27 */ |
| 28 SK_ATTR_DEPRECATED("use Create(SkShader*, const CropRect*)") | 28 SK_ATTR_DEPRECATED("use Create(SkShader*, const CropRect*)") |
| 29 static SkRectShaderImageFilter* Create(SkShader* s, const SkRect& rect); | 29 static SkRectShaderImageFilter* Create(SkShader* s, const SkRect& rect); |
| 30 | 30 |
| 31 static SkRectShaderImageFilter* Create(SkShader* s, const CropRect* rect = N
ULL); | 31 static SkRectShaderImageFilter* Create(SkShader* s, const CropRect* rect = N
ULL); |
| 32 virtual ~SkRectShaderImageFilter(); | 32 virtual ~SkRectShaderImageFilter(); |
| 33 bool affectsTransparentBlack() const override; |
| 33 | 34 |
| 34 SK_TO_STRING_OVERRIDE() | 35 SK_TO_STRING_OVERRIDE() |
| 35 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkRectShaderImageFilter) | 36 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkRectShaderImageFilter) |
| 36 | 37 |
| 37 protected: | 38 protected: |
| 38 void flatten(SkWriteBuffer&) const override; | 39 void flatten(SkWriteBuffer&) const override; |
| 39 | 40 |
| 40 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, | 41 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, |
| 41 SkBitmap* result, SkIPoint* loc) const override; | 42 SkBitmap* result, SkIPoint* loc) const override; |
| 42 | 43 |
| 43 private: | 44 private: |
| 44 SkRectShaderImageFilter(SkShader* s, const CropRect* rect); | 45 SkRectShaderImageFilter(SkShader* s, const CropRect* rect); |
| 45 SkShader* fShader; | 46 SkShader* fShader; |
| 46 | 47 |
| 47 typedef SkImageFilter INHERITED; | 48 typedef SkImageFilter INHERITED; |
| 48 }; | 49 }; |
| 49 | 50 |
| 50 #endif | 51 #endif |
| OLD | NEW |