gfx/skia/trunk/src/effects/SkGpuBlurUtils.h

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1 /*
michael@0 2 * Copyright 2013 Google Inc.
michael@0 3 *
michael@0 4 * Use of this source code is governed by a BSD-style license that can be
michael@0 5 * found in the LICENSE file.
michael@0 6 */
michael@0 7
michael@0 8 #ifndef SkGpuBlurUtils_DEFINED
michael@0 9 #define SkGpuBlurUtils_DEFINED
michael@0 10
michael@0 11 #if SK_SUPPORT_GPU
michael@0 12 class GrTexture;
michael@0 13 class GrContext;
michael@0 14 #endif
michael@0 15
michael@0 16 struct SkRect;
michael@0 17
michael@0 18 namespace SkGpuBlurUtils {
michael@0 19
michael@0 20 #if SK_SUPPORT_GPU
michael@0 21 /**
michael@0 22 * Applies a 2D Gaussian blur to a given texture.
michael@0 23 * @param context The GPU context
michael@0 24 * @param srcTexture The source texture to be blurred.
michael@0 25 * @param canClobberSrc If true, srcTexture may be overwritten, and
michael@0 26 * may be returned as the result.
michael@0 27 * @param rect The destination rectangle.
michael@0 28 * @param cropToRect If true, do not sample any pixels outside the
michael@0 29 * source rect.
michael@0 30 * @param sigmaX The blur's standard deviation in X.
michael@0 31 * @param sigmaY The blur's standard deviation in Y.
michael@0 32 * @return the blurred texture, which may be srcTexture reffed, or a
michael@0 33 * new texture. It is the caller's responsibility to unref this texture.
michael@0 34 */
michael@0 35 GrTexture* GaussianBlur(GrContext* context,
michael@0 36 GrTexture* srcTexture,
michael@0 37 bool canClobberSrc,
michael@0 38 const SkRect& rect,
michael@0 39 bool cropToRect,
michael@0 40 float sigmaX,
michael@0 41 float sigmaY);
michael@0 42 #endif
michael@0 43
michael@0 44 };
michael@0 45
michael@0 46 #endif

mercurial