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

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

Issue 2186633002: Remove all usage of SkSurfaceProps::isGammaCorrect() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « 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 "GrDrawContext.h" 12 #include "GrDrawContext.h"
13 13
14 class GrContext; 14 class GrContext;
15 class GrTexture; 15 class GrTexture;
16 16
17 struct SkRect; 17 struct SkRect;
18 18
19 namespace SkGpuBlurUtils { 19 namespace SkGpuBlurUtils {
20 /** 20 /**
21 * Applies a 2D Gaussian blur to a given texture. The blurred result is retur ned 21 * Applies a 2D Gaussian blur to a given texture. The blurred result is retur ned
22 * as a drawContext in case the caller wishes to future draw into the result. 22 * as a drawContext in case the caller wishes to future draw into the result.
23 * Note: one of sigmaX and sigmaY should be non-zero! 23 * Note: one of sigmaX and sigmaY should be non-zero!
24 * @param context The GPU context 24 * @param context The GPU context
25 * @param srcTexture The source texture to be blurred. 25 * @param srcTexture The source texture to be blurred.
26 * @param colorSpace Color space of the source (used for the drawContext result, too). 26 * @param colorSpace Color space of the source (used for the drawContext result, too).
27 * @param gammaCorrect Should blur be gamma-correct (sRGB to linear, etc.. .)
28 * @param dstBounds The destination bounds, relative to the source text ure. 27 * @param dstBounds The destination bounds, relative to the source text ure.
29 * @param srcBounds The source bounds, relative to the source texture. If non-null, 28 * @param srcBounds The source bounds, relative to the source texture. If non-null,
30 * no pixels will be sampled outside of this rectangle . 29 * no pixels will be sampled outside of this rectangle .
31 * @param sigmaX The blur's standard deviation in X. 30 * @param sigmaX The blur's standard deviation in X.
32 * @param sigmaY The blur's standard deviation in Y. 31 * @param sigmaY The blur's standard deviation in Y.
33 * @return The drawContext containing the blurred result. 32 * @return The drawContext containing the blurred result.
34 */ 33 */
35 sk_sp<GrDrawContext> GaussianBlur(GrContext* context, 34 sk_sp<GrDrawContext> GaussianBlur(GrContext* context,
36 GrTexture* srcTexture, 35 GrTexture* srcTexture,
37 sk_sp<SkColorSpace> colorSpace, 36 sk_sp<SkColorSpace> colorSpace,
38 bool gammaCorrect,
39 const SkIRect& dstBounds, 37 const SkIRect& dstBounds,
40 const SkIRect* srcBounds, 38 const SkIRect* srcBounds,
41 float sigmaX, 39 float sigmaX,
42 float sigmaY); 40 float sigmaY);
43 }; 41 };
44 42
45 #endif 43 #endif
46 #endif 44 #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