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.

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

mercurial