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

Side by Side Diff: include/effects/SkRectShaderImageFilter.h

Issue 1500923004: Matrix convolution bounds fix; affectsTransparentBlack fixes. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Alternate, more future-proof fix Created 5 years 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 | « include/effects/SkMatrixConvolutionImageFilter.h ('k') | src/core/SkImageFilter.cpp » ('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 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 11 matching lines...) Expand all
22 * @param s Shader to call for processing. Cannot be NULL. Will be 22 * @param s Shader to call for processing. Cannot be NULL. Will be
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 SkImageFilter* Create(SkShader* s, const SkRect& rect); 29 static SkImageFilter* Create(SkShader* s, const SkRect& rect);
30 static SkImageFilter* Create(SkShader* s, const CropRect* rect = NULL); 30 static SkImageFilter* Create(SkShader* s, const CropRect* rect = NULL);
31 31
32 bool affectsTransparentBlack() const override; 32 bool canComputeFastBounds() const override;
33 33
34 SK_TO_STRING_OVERRIDE() 34 SK_TO_STRING_OVERRIDE()
35 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkRectShaderImageFilter) 35 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkRectShaderImageFilter)
36 36
37 protected: 37 protected:
38 virtual ~SkRectShaderImageFilter(); 38 virtual ~SkRectShaderImageFilter();
39 39
40 void flatten(SkWriteBuffer&) const override; 40 void flatten(SkWriteBuffer&) const override;
41 bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, SkBitmap* re sult, 41 bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, SkBitmap* re sult,
42 SkIPoint* loc) const override; 42 SkIPoint* loc) const override;
43 43
44 private: 44 private:
45 SkRectShaderImageFilter(SkShader* s, const CropRect* rect); 45 SkRectShaderImageFilter(SkShader* s, const CropRect* rect);
46 46
47 SkShader* fShader; 47 SkShader* fShader;
48 48
49 typedef SkImageFilter INHERITED; 49 typedef SkImageFilter INHERITED;
50 }; 50 };
51 51
52 #endif 52 #endif
OLDNEW
« no previous file with comments | « include/effects/SkMatrixConvolutionImageFilter.h ('k') | src/core/SkImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698