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

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

Issue 51033004: add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « include/effects/SkPorterDuff.h ('k') | include/gpu/SkGpuDevice.h » ('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
11 #include "SkImageFilter.h" 11 #include "SkImageFilter.h"
12 #include "SkRect.h" 12 #include "SkRect.h"
13 13
14 class SkShader; 14 class SkShader;
15 15
16 class SK_API SkRectShaderImageFilter : public SkImageFilter { 16 class SK_API SkRectShaderImageFilter : public SkImageFilter {
17 public: 17 public:
18 /** Create a new image filter which fills the given rectangle with pixels 18 /** Create a new image filter which fills the given rectangle with pixels
19 * produced by the given SkShader. If no rectangle is specified, an output 19 * produced by the given SkShader. If no rectangle is specified, an output
20 * is produced with the same bounds as the input primitive (even though 20 * is produced with the same bounds as the input primitive (even though
21 * the input primitive's pixels are not used for processing). 21 * the input primitive's pixels are not used for processing).
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 /* DEPRECATED */ static SkRectShaderImageFilter* Create(SkShader* s, const S kRect& rect); 28 SK_ATTR_DEPRECATED("use Create(SkShader*, const CropRect*)")
29 static SkRectShaderImageFilter* Create(SkShader* s, const SkRect& rect);
30
29 static SkRectShaderImageFilter* Create(SkShader* s, const CropRect* rect = N ULL); 31 static SkRectShaderImageFilter* Create(SkShader* s, const CropRect* rect = N ULL);
30 virtual ~SkRectShaderImageFilter(); 32 virtual ~SkRectShaderImageFilter();
31 33
32 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkRectShaderImageFilter) 34 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkRectShaderImageFilter)
33 35
34 protected: 36 protected:
35 SkRectShaderImageFilter(SkFlattenableReadBuffer& buffer); 37 SkRectShaderImageFilter(SkFlattenableReadBuffer& buffer);
36 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; 38 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
37 39
38 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&, 40 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
39 SkBitmap* result, SkIPoint* loc) SK_OVERRIDE; 41 SkBitmap* result, SkIPoint* loc) SK_OVERRIDE;
40 42
41 private: 43 private:
42 SkRectShaderImageFilter(SkShader* s, const CropRect* rect); 44 SkRectShaderImageFilter(SkShader* s, const CropRect* rect);
43 SkShader* fShader; 45 SkShader* fShader;
44 46
45 typedef SkImageFilter INHERITED; 47 typedef SkImageFilter INHERITED;
46 }; 48 };
47 49
48 #endif 50 #endif
OLDNEW
« no previous file with comments | « include/effects/SkPorterDuff.h ('k') | include/gpu/SkGpuDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698