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

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

Issue 17035007: Fix quickReject computation for blurs (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: cleaned up more Created 7 years, 6 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 | Annotate | Revision Log
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 @param ambient 0...1 amount of ambient light 47 @param ambient 0...1 amount of ambient light
48 @param specular coefficient for specular highlights (e.g. 8) 48 @param specular coefficient for specular highlights (e.g. 8)
49 @param blurRadius amount to blur before applying lighting (e.g. 3) 49 @param blurRadius amount to blur before applying lighting (e.g. 3)
50 @return the emboss maskfilter 50 @return the emboss maskfilter
51 */ 51 */
52 static SkMaskFilter* CreateEmboss( const SkScalar direction[3], 52 static SkMaskFilter* CreateEmboss( const SkScalar direction[3],
53 SkScalar ambient, SkScalar specular, 53 SkScalar ambient, SkScalar specular,
54 SkScalar blurRadius); 54 SkScalar blurRadius);
55 55
56 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() 56 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP()
57
58 // This constant approximates the scaling done in the software path's
59 // "high quality" mode, in SkBlurMask::Blur() (1 / sqrt(3)).
60 // IMHO, it actually should be 1: we blur "less" than we should do
61 // according to the CSS and canvas specs, simply because Safari does the sam e.
62 // Firefox used to do the same too, until 4.0 where they fixed it. So at so me
63 // point we should probably get rid of these scaling constants and rebaselin e
64 // all the blur tests.
65 static const SkScalar kBLUR_SIGMA_SCALE;
66
67 // scale factor for the blur radius to match the behavior of the all existin g blur
68 // code (both on the CPU and the GPU). This magic constant is 1/sqrt(3).
69 // TODO: get rid of this fudge factor and move any required fudging up into
70 // the calling library
71 static const SkScalar kBlurRadiusFudgeFactor;
72
57 private: 73 private:
58 SkBlurMaskFilter(); // can't be instantiated 74 SkBlurMaskFilter(); // can't be instantiated
59 }; 75 };
60 76
61 #endif 77 #endif
OLDNEW
« no previous file with comments | « gyp/gpu.gyp ('k') | src/effects/SkBlurMask.cpp » ('j') | src/gpu/SkGpuDevice.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698