gfx/skia/trunk/src/gpu/GrAAHairLinePathRenderer.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.

     2 /*
     3  * Copyright 2011 Google Inc.
     4  *
     5  * Use of this source code is governed by a BSD-style license that can be
     6  * found in the LICENSE file.
     7  */
     9 #ifndef GrAAHairLinePathRenderer_DEFINED
    10 #define GrAAHairLinePathRenderer_DEFINED
    12 #include "GrPathRenderer.h"
    14 class GrAAHairLinePathRenderer : public GrPathRenderer {
    15 public:
    16     virtual ~GrAAHairLinePathRenderer();
    18     static GrPathRenderer* Create(GrContext* context);
    20     virtual bool canDrawPath(const SkPath& path,
    21                              const SkStrokeRec& stroke,
    22                              const GrDrawTarget* target,
    23                              bool antiAlias) const SK_OVERRIDE;
    25     typedef SkTArray<SkPoint, true> PtArray;
    26     typedef SkTArray<int, true> IntArray;
    27     typedef SkTArray<float, true> FloatArray;
    29 protected:
    30     virtual bool onDrawPath(const SkPath& path,
    31                             const SkStrokeRec& stroke,
    32                             GrDrawTarget* target,
    33                             bool antiAlias) SK_OVERRIDE;
    35 private:
    36     GrAAHairLinePathRenderer(const GrContext* context,
    37                              const GrIndexBuffer* fLinesIndexBuffer,
    38                              const GrIndexBuffer* fQuadsIndexBuffer);
    40     bool createLineGeom(const SkPath& path,
    41                         GrDrawTarget* target,
    42                         const PtArray& lines,
    43                         int lineCnt,
    44                         GrDrawTarget::AutoReleaseGeometry* arg,
    45                         SkRect* devBounds);
    47     bool createBezierGeom(const SkPath& path,
    48                           GrDrawTarget* target,
    49                           const PtArray& quads,
    50                           int quadCnt,
    51                           const PtArray& conics,
    52                           int conicCnt,
    53                           const IntArray& qSubdivs,
    54                           const FloatArray& cWeights,
    55                           GrDrawTarget::AutoReleaseGeometry* arg,
    56                           SkRect* devBounds);
    58     const GrIndexBuffer*        fLinesIndexBuffer;
    59     const GrIndexBuffer*        fQuadsIndexBuffer;
    61     typedef GrPathRenderer INHERITED;
    62 };
    65 #endif

mercurial