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

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/skia/trunk/src/gpu/GrSoftwarePathRenderer.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,47 @@
     1.4 +
     1.5 +/*
     1.6 + * Copyright 2012 Google Inc.
     1.7 + *
     1.8 + * Use of this source code is governed by a BSD-style license that can be
     1.9 + * found in the LICENSE file.
    1.10 + */
    1.11 +
    1.12 +#ifndef GrSoftwarePathRenderer_DEFINED
    1.13 +#define GrSoftwarePathRenderer_DEFINED
    1.14 +
    1.15 +#include "GrPathRenderer.h"
    1.16 +
    1.17 +class GrContext;
    1.18 +class GrAutoScratchTexture;
    1.19 +
    1.20 +/**
    1.21 + * This class uses the software side to render a path to an SkBitmap and
    1.22 + * then uploads the result to the gpu
    1.23 + */
    1.24 +class GrSoftwarePathRenderer : public GrPathRenderer {
    1.25 +public:
    1.26 +    GrSoftwarePathRenderer(GrContext* context)
    1.27 +        : fContext(context) {
    1.28 +    }
    1.29 +
    1.30 +    virtual bool canDrawPath(const SkPath&,
    1.31 +                             const SkStrokeRec&,
    1.32 +                             const GrDrawTarget*,
    1.33 +                             bool antiAlias) const SK_OVERRIDE;
    1.34 +protected:
    1.35 +    virtual StencilSupport onGetStencilSupport(const SkPath&,
    1.36 +                                               const SkStrokeRec&,
    1.37 +                                               const GrDrawTarget*) const SK_OVERRIDE;
    1.38 +
    1.39 +    virtual bool onDrawPath(const SkPath&,
    1.40 +                            const SkStrokeRec&,
    1.41 +                            GrDrawTarget*,
    1.42 +                            bool antiAlias) SK_OVERRIDE;
    1.43 +
    1.44 +private:
    1.45 +    GrContext*     fContext;
    1.46 +
    1.47 +    typedef GrPathRenderer INHERITED;
    1.48 +};
    1.49 +
    1.50 +#endif

mercurial