gfx/skia/trunk/src/gpu/GrDefaultPathRenderer.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 2011 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 GrDefaultPathRenderer_DEFINED
     9 #define GrDefaultPathRenderer_DEFINED
    11 #include "GrPathRenderer.h"
    12 #include "SkTemplates.h"
    14 /**
    15  *  Subclass that renders the path using the stencil buffer to resolve fill rules
    16  * (e.g. winding, even-odd)
    17  */
    18 class SK_API GrDefaultPathRenderer : public GrPathRenderer {
    19 public:
    20     GrDefaultPathRenderer(bool separateStencilSupport, bool stencilWrapOpsSupport);
    22     virtual bool canDrawPath(const SkPath&,
    23                              const SkStrokeRec&,
    24                              const GrDrawTarget*,
    25                              bool antiAlias) const SK_OVERRIDE;
    27 private:
    29     virtual StencilSupport onGetStencilSupport(const SkPath&,
    30                                                const SkStrokeRec&,
    31                                                const GrDrawTarget*) const SK_OVERRIDE;
    33     virtual bool onDrawPath(const SkPath&,
    34                             const SkStrokeRec&,
    35                             GrDrawTarget*,
    36                             bool antiAlias) SK_OVERRIDE;
    38     virtual void onStencilPath(const SkPath&,
    39                                const SkStrokeRec&,
    40                                GrDrawTarget*) SK_OVERRIDE;
    42     bool internalDrawPath(const SkPath&,
    43                           const SkStrokeRec&,
    44                           GrDrawTarget*,
    45                           bool stencilOnly);
    47     bool createGeom(const SkPath&,
    48                     const SkStrokeRec&,
    49                     SkScalar srcSpaceTol,
    50                     GrDrawTarget*,
    51                     GrPrimitiveType*,
    52                     int* vertexCnt,
    53                     int* indexCnt,
    54                     GrDrawTarget::AutoReleaseGeometry*);
    56     bool    fSeparateStencil;
    57     bool    fStencilWrapOps;
    59     typedef GrPathRenderer INHERITED;
    60 };
    62 #endif

mercurial