1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/skia/trunk/src/effects/SkGpuBlurUtils.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,46 @@ 1.4 +/* 1.5 + * Copyright 2013 Google Inc. 1.6 + * 1.7 + * Use of this source code is governed by a BSD-style license that can be 1.8 + * found in the LICENSE file. 1.9 + */ 1.10 + 1.11 +#ifndef SkGpuBlurUtils_DEFINED 1.12 +#define SkGpuBlurUtils_DEFINED 1.13 + 1.14 +#if SK_SUPPORT_GPU 1.15 +class GrTexture; 1.16 +class GrContext; 1.17 +#endif 1.18 + 1.19 +struct SkRect; 1.20 + 1.21 +namespace SkGpuBlurUtils { 1.22 + 1.23 +#if SK_SUPPORT_GPU 1.24 + /** 1.25 + * Applies a 2D Gaussian blur to a given texture. 1.26 + * @param context The GPU context 1.27 + * @param srcTexture The source texture to be blurred. 1.28 + * @param canClobberSrc If true, srcTexture may be overwritten, and 1.29 + * may be returned as the result. 1.30 + * @param rect The destination rectangle. 1.31 + * @param cropToRect If true, do not sample any pixels outside the 1.32 + * source rect. 1.33 + * @param sigmaX The blur's standard deviation in X. 1.34 + * @param sigmaY The blur's standard deviation in Y. 1.35 + * @return the blurred texture, which may be srcTexture reffed, or a 1.36 + * new texture. It is the caller's responsibility to unref this texture. 1.37 + */ 1.38 + GrTexture* GaussianBlur(GrContext* context, 1.39 + GrTexture* srcTexture, 1.40 + bool canClobberSrc, 1.41 + const SkRect& rect, 1.42 + bool cropToRect, 1.43 + float sigmaX, 1.44 + float sigmaY); 1.45 +#endif 1.46 + 1.47 +}; 1.48 + 1.49 +#endif