diff options
author | 2011-10-12 19:53:16 +0000 | |
---|---|---|
committer | 2011-10-12 19:53:16 +0000 | |
commit | d38f137e9b813f8193675ebd3dfbfe8bc42639e9 (patch) | |
tree | 1e670c378d7b31a4538fde3c2b3e4e29b72c05b5 /src/gpu/GrAAHairLinePathRenderer.h | |
parent | 4d5cb45f3e3e62633304b4911d131cdd02dfd541 (diff) |
Move gpu/include/* to include/gpu and gpu/src/* to src/gpu
Review URL: http://codereview.appspot.com/5250070/
git-svn-id: http://skia.googlecode.com/svn/trunk@2471 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrAAHairLinePathRenderer.h')
-rw-r--r-- | src/gpu/GrAAHairLinePathRenderer.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/src/gpu/GrAAHairLinePathRenderer.h b/src/gpu/GrAAHairLinePathRenderer.h new file mode 100644 index 0000000000..81cecf2c68 --- /dev/null +++ b/src/gpu/GrAAHairLinePathRenderer.h @@ -0,0 +1,61 @@ + +/* + * Copyright 2011 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef GrAAHairLinePathRenderer_DEFINED +#define GrAAHairLinePathRenderer_DEFINED + +#include "GrPathRenderer.h" + +class GrAAHairLinePathRenderer : public GrPathRenderer { +public: + virtual ~GrAAHairLinePathRenderer(); + + static GrPathRenderer* Create(GrContext* context); + // GrPathRenderer overrides + virtual bool supportsAA(const GrDrawTarget* target, + const SkPath& path, + GrPathFill fill) const; + virtual bool canDrawPath(const GrDrawTarget* target, + const SkPath& path, + GrPathFill fill) const; + virtual void drawPath(GrDrawTarget::StageBitfield stages); + +protected: + + // GrPathRenderer overrides + virtual void pathWillClear(); + +private: + void resetGeom(); + + GrAAHairLinePathRenderer(const GrContext* context, + const GrIndexBuffer* fLinesIndexBuffer, + const GrIndexBuffer* fQuadsIndexBuffer); + + bool createGeom(GrDrawTarget::StageBitfield stages); + + const GrIndexBuffer* fLinesIndexBuffer; + const GrIndexBuffer* fQuadsIndexBuffer; + + // have to recreate geometry if stages in use changes :( + GrDrawTarget::StageBitfield fPreviousStages; + int fPreviousRTHeight; + SkVector fPreviousTranslate; + GrIRect fClipRect; + + // this path renderer draws everything in device coordinates + GrMatrix fPreviousViewMatrix; + int fLineSegmentCnt; + int fQuadCnt; + + typedef GrPathRenderer INHERITED; +}; + + +#endif + |