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

Side by Side Diff: src/effects/SkGpuBlurUtils.h

Issue 1958603002: Simplify SkGpuBlurUtils::GaussianBlur method (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix indents Created 4 years, 7 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 | « src/effects/SkBlurMaskFilter.cpp ('k') | src/effects/SkGpuBlurUtils.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 SkGpuBlurUtils_DEFINED 8 #ifndef SkGpuBlurUtils_DEFINED
9 #define SkGpuBlurUtils_DEFINED 9 #define SkGpuBlurUtils_DEFINED
10 10
11 #if SK_SUPPORT_GPU 11 #if SK_SUPPORT_GPU
12 #include "GrTextureProvider.h" 12 #include "GrTextureProvider.h"
13 13
14 class GrTexture; 14 class GrTexture;
15 class GrContext; 15 class GrContext;
16 #endif 16 #endif
17 17
18 struct SkRect; 18 struct SkRect;
19 19
20 namespace SkGpuBlurUtils { 20 namespace SkGpuBlurUtils {
21 21
22 #if SK_SUPPORT_GPU 22 #if SK_SUPPORT_GPU
23 /** 23 /**
24 * Applies a 2D Gaussian blur to a given texture. 24 * Applies a 2D Gaussian blur to a given texture.
25 * @param context The GPU context 25 * @param context The GPU context
26 * @param srcTexture The source texture to be blurred. 26 * @param srcTexture The source texture to be blurred.
27 * @param canClobberSrc If true, srcTexture may be overwritten, and
28 * may be returned as the result.
29 * @param gammaCorrect Should blur be gamma-correct (sRGB to linear, etc.. .) 27 * @param gammaCorrect Should blur be gamma-correct (sRGB to linear, etc.. .)
30 * @param dstBounds The destination bounds, relative to the source text ure. 28 * @param dstBounds The destination bounds, relative to the source text ure.
31 * @param srcBounds The source bounds, relative to the source texture. If non-null, 29 * @param srcBounds The source bounds, relative to the source texture. If non-null,
32 * no pixels will be sampled outside of this rectangle . 30 * no pixels will be sampled outside of this rectangle .
33 * @param sigmaX The blur's standard deviation in X. 31 * @param sigmaX The blur's standard deviation in X.
34 * @param sigmaY The blur's standard deviation in Y. 32 * @param sigmaY The blur's standard deviation in Y.
35 * @return the blurred texture, which may be srcTexture reffed, or a 33 * @return the blurred texture, which may be srcTexture reffed, or a
36 * new texture. It is the caller's responsibility to unref this texture. 34 * new texture. It is the caller's responsibility to unref this texture.
37 */ 35 */
38 GrTexture* GaussianBlur(GrContext* context, 36 GrTexture* GaussianBlur(GrContext* context,
39 GrTexture* srcTexture, 37 GrTexture* srcTexture,
40 bool canClobberSrc,
41 bool gammaCorrect, 38 bool gammaCorrect,
42 const SkRect& dstBounds, 39 const SkRect& dstBounds,
43 const SkRect* srcBounds, 40 const SkRect* srcBounds,
44 float sigmaX, 41 float sigmaX,
45 float sigmaY); 42 float sigmaY);
46 #endif 43 #endif
47 44
48 }; 45 };
49 46
50 #endif 47 #endif
OLDNEW
« no previous file with comments | « src/effects/SkBlurMaskFilter.cpp ('k') | src/effects/SkGpuBlurUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698