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

Side by Side Diff: include/effects/SkBlurMaskFilter.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/SkBlurDrawLooper.h ('k') | include/effects/SkEmbossMaskFilter.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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 SkBlurMaskFilter_DEFINED 8 #ifndef SkBlurMaskFilter_DEFINED
9 #define SkBlurMaskFilter_DEFINED 9 #define SkBlurMaskFilter_DEFINED
10 10
(...skipping 15 matching lines...) Expand all
26 enum BlurFlags { 26 enum BlurFlags {
27 kNone_BlurFlag = 0x00, 27 kNone_BlurFlag = 0x00,
28 /** The blur layer's radius is not affected by transforms */ 28 /** The blur layer's radius is not affected by transforms */
29 kIgnoreTransform_BlurFlag = 0x01, 29 kIgnoreTransform_BlurFlag = 0x01,
30 /** Use a smother, higher qulity blur algorithm */ 30 /** Use a smother, higher qulity blur algorithm */
31 kHighQuality_BlurFlag = 0x02, 31 kHighQuality_BlurFlag = 0x02,
32 /** mask for all blur flags */ 32 /** mask for all blur flags */
33 kAll_BlurFlag = 0x03 33 kAll_BlurFlag = 0x03
34 }; 34 };
35 35
36 /** 36 SK_ATTR_DEPRECATED("use sigma version")
37 * DEPRECATED - radius-based
38 */
39 static SkMaskFilter* Create(SkScalar radius, BlurStyle style, 37 static SkMaskFilter* Create(SkScalar radius, BlurStyle style,
40 uint32_t flags = kNone_BlurFlag); 38 uint32_t flags = kNone_BlurFlag);
41 39
42 /** Create a blur maskfilter. 40 /** Create a blur maskfilter.
43 @param style The BlurStyle to use 41 @param style The BlurStyle to use
44 @param sigma Standard deviation of the Gaussian blur to apply. Must b e > 0. 42 @param sigma Standard deviation of the Gaussian blur to apply. Must b e > 0.
45 @param flags Flags to use - defaults to none 43 @param flags Flags to use - defaults to none
46 @return The new blur maskfilter 44 @return The new blur maskfilter
47 */ 45 */
48 static SkMaskFilter* Create(BlurStyle style, SkScalar sigma, 46 static SkMaskFilter* Create(BlurStyle style, SkScalar sigma,
49 uint32_t flags = kNone_BlurFlag); 47 uint32_t flags = kNone_BlurFlag);
50 48
51 /** Create an emboss maskfilter 49 /** Create an emboss maskfilter
52 @param blurSigma standard deviation of the Gaussian blur to apply 50 @param blurSigma standard deviation of the Gaussian blur to apply
53 before applying lighting (e.g. 3) 51 before applying lighting (e.g. 3)
54 @param direction array of 3 scalars [x, y, z] specifying the directio n of the light source 52 @param direction array of 3 scalars [x, y, z] specifying the directio n of the light source
55 @param ambient 0...1 amount of ambient light 53 @param ambient 0...1 amount of ambient light
56 @param specular coefficient for specular highlights (e.g. 8) 54 @param specular coefficient for specular highlights (e.g. 8)
57 @return the emboss maskfilter 55 @return the emboss maskfilter
58 */ 56 */
59 static SkMaskFilter* CreateEmboss(SkScalar blurSigma, const SkScalar directi on[3], 57 static SkMaskFilter* CreateEmboss(SkScalar blurSigma, const SkScalar directi on[3],
60 SkScalar ambient, SkScalar specular); 58 SkScalar ambient, SkScalar specular);
61 59
62 // DEPRECATED - radius-based 60 SK_ATTR_DEPRECATED("use sigma version")
63 static SkMaskFilter* CreateEmboss(const SkScalar direction[3], 61 static SkMaskFilter* CreateEmboss(const SkScalar direction[3],
64 SkScalar ambient, SkScalar specular, 62 SkScalar ambient, SkScalar specular,
65 SkScalar blurRadius); 63 SkScalar blurRadius);
66 64
67 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() 65 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP()
68 66
69 private: 67 private:
70 SkBlurMaskFilter(); // can't be instantiated 68 SkBlurMaskFilter(); // can't be instantiated
71 }; 69 };
72 70
73 #endif 71 #endif
OLDNEW
« no previous file with comments | « include/effects/SkBlurDrawLooper.h ('k') | include/effects/SkEmbossMaskFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698