gfx/skia/trunk/src/gpu/GrStencilAndCoverPathRenderer.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     2 /*
     3  * Copyright 2012 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 GrBuiltInPathRenderer_DEFINED
    10 #define GrBuiltInPathRenderer_DEFINED
    12 #include "GrPathRenderer.h"
    14 class GrContext;
    15 class GrGpu;
    17 /**
    18  * Uses GrGpu::stencilPath followed by a cover rectangle. This subclass doesn't apply AA; it relies
    19  * on the target having MSAA if AA is desired.
    20  */
    21 class GrStencilAndCoverPathRenderer : public GrPathRenderer {
    22 public:
    24     static GrPathRenderer* Create(GrContext*);
    26     virtual ~GrStencilAndCoverPathRenderer();
    28     virtual bool canDrawPath(const SkPath&,
    29                              const SkStrokeRec&,
    30                              const GrDrawTarget*,
    31                              bool antiAlias) const SK_OVERRIDE;
    33 protected:
    34     virtual StencilSupport onGetStencilSupport(const SkPath&,
    35                                                const SkStrokeRec&,
    36                                                const GrDrawTarget*) const SK_OVERRIDE;
    38     virtual bool onDrawPath(const SkPath&,
    39                             const SkStrokeRec&,
    40                             GrDrawTarget*,
    41                             bool antiAlias) SK_OVERRIDE;
    43     virtual void onStencilPath(const SkPath&,
    44                                const SkStrokeRec&,
    45                                GrDrawTarget*) SK_OVERRIDE;
    47 private:
    48     GrStencilAndCoverPathRenderer(GrGpu*);
    50     GrGpu* fGpu;
    52     typedef GrPathRenderer INHERITED;
    53 };
    55 #endif

mercurial