gfx/skia/trunk/src/gpu/GrSoftwarePathRenderer.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 GrSoftwarePathRenderer_DEFINED
    10 #define GrSoftwarePathRenderer_DEFINED
    12 #include "GrPathRenderer.h"
    14 class GrContext;
    15 class GrAutoScratchTexture;
    17 /**
    18  * This class uses the software side to render a path to an SkBitmap and
    19  * then uploads the result to the gpu
    20  */
    21 class GrSoftwarePathRenderer : public GrPathRenderer {
    22 public:
    23     GrSoftwarePathRenderer(GrContext* context)
    24         : fContext(context) {
    25     }
    27     virtual bool canDrawPath(const SkPath&,
    28                              const SkStrokeRec&,
    29                              const GrDrawTarget*,
    30                              bool antiAlias) const SK_OVERRIDE;
    31 protected:
    32     virtual StencilSupport onGetStencilSupport(const SkPath&,
    33                                                const SkStrokeRec&,
    34                                                const GrDrawTarget*) const SK_OVERRIDE;
    36     virtual bool onDrawPath(const SkPath&,
    37                             const SkStrokeRec&,
    38                             GrDrawTarget*,
    39                             bool antiAlias) SK_OVERRIDE;
    41 private:
    42     GrContext*     fContext;
    44     typedef GrPathRenderer INHERITED;
    45 };
    47 #endif

mercurial