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

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

Issue 2201133002: Implement GPU occluded blur mask filter (Closed) Base URL: https://skia.googlesource.com/skia.git@occluded-blur
Patch Set: update to ToT Created 4 years, 4 months 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/core/SkPicture.h ('k') | src/core/SkMaskFilter.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 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 14 matching lines...) Expand all
25 kNone_BlurFlag = 0x00, 25 kNone_BlurFlag = 0x00,
26 /** The blur layer's radius is not affected by transforms */ 26 /** The blur layer's radius is not affected by transforms */
27 kIgnoreTransform_BlurFlag = 0x01, 27 kIgnoreTransform_BlurFlag = 0x01,
28 /** Use a smother, higher qulity blur algorithm */ 28 /** Use a smother, higher qulity blur algorithm */
29 kHighQuality_BlurFlag = 0x02, 29 kHighQuality_BlurFlag = 0x02,
30 /** mask for all blur flags */ 30 /** mask for all blur flags */
31 kAll_BlurFlag = 0x03 31 kAll_BlurFlag = 0x03
32 }; 32 };
33 33
34 /** Create a blur maskfilter. 34 /** Create a blur maskfilter.
35 * @param style The SkBlurStyle to use 35 * @param style The SkBlurStyle to use
36 * @param sigma Standard deviation of the Gaussian blur to apply. Must b e > 0. 36 * @param sigma Standard deviation of the Gaussian blur to apply. Must be > 0.
37 * @param flags Flags to use - defaults to none 37 * @param occluder The rect for which no pixels need be drawn (b.c. it wil l be overdrawn
38 * with some opaque object. This is just a hint which back ends are free to
39 * ignore.
40 * @param flags Flags to use - defaults to none
38 * @return The new blur maskfilter 41 * @return The new blur maskfilter
39 */ 42 */
40 static sk_sp<SkMaskFilter> Make(SkBlurStyle style, SkScalar sigma, 43 static sk_sp<SkMaskFilter> Make(SkBlurStyle style, SkScalar sigma,
41 uint32_t flags = kNone_BlurFlag); 44 const SkRect& occluder, uint32_t flags = kNo ne_BlurFlag);
45
46 static sk_sp<SkMaskFilter> Make(SkBlurStyle style, SkScalar sigma,
47 uint32_t flags = kNone_BlurFlag) {
48 return Make(style, sigma, SkRect::MakeEmpty(), flags);
49 }
42 50
43 /** Create an emboss maskfilter 51 /** Create an emboss maskfilter
44 @param blurSigma standard deviation of the Gaussian blur to apply 52 @param blurSigma standard deviation of the Gaussian blur to apply
45 before applying lighting (e.g. 3) 53 before applying lighting (e.g. 3)
46 @param direction array of 3 scalars [x, y, z] specifying the directio n of the light source 54 @param direction array of 3 scalars [x, y, z] specifying the directio n of the light source
47 @param ambient 0...1 amount of ambient light 55 @param ambient 0...1 amount of ambient light
48 @param specular coefficient for specular highlights (e.g. 8) 56 @param specular coefficient for specular highlights (e.g. 8)
49 @return the emboss maskfilter 57 @return the emboss maskfilter
50 */ 58 */
51 static sk_sp<SkMaskFilter> MakeEmboss(SkScalar blurSigma, const SkScalar dir ection[3], 59 static sk_sp<SkMaskFilter> MakeEmboss(SkScalar blurSigma, const SkScalar dir ection[3],
(...skipping 23 matching lines...) Expand all
75 int* numYs); 83 int* numYs);
76 84
77 85
78 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() 86 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP()
79 87
80 private: 88 private:
81 SkBlurMaskFilter(); // can't be instantiated 89 SkBlurMaskFilter(); // can't be instantiated
82 }; 90 };
83 91
84 #endif 92 #endif
OLDNEW
« no previous file with comments | « include/core/SkPicture.h ('k') | src/core/SkMaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698