diff options
author | 2012-04-27 12:08:47 +0000 | |
---|---|---|
committer | 2012-04-27 12:08:47 +0000 | |
commit | f4c2c527dd3cab979621fdfbc07eb22fee103472 (patch) | |
tree | f73dbdf1a28609c7f83b65fb09ae2499f6bfaf92 /src/gpu/GrSoftwarePathRenderer.h | |
parent | fa0588ff672564af1c235a63589573829035a60b (diff) |
First portion of refactoring to bundle SW path rendering into GrPathRenderer
http://codereview.appspot.com/6125046/
git-svn-id: http://skia.googlecode.com/svn/trunk@3769 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrSoftwarePathRenderer.h')
-rw-r--r-- | src/gpu/GrSoftwarePathRenderer.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/gpu/GrSoftwarePathRenderer.h b/src/gpu/GrSoftwarePathRenderer.h new file mode 100644 index 0000000000..859a53d467 --- /dev/null +++ b/src/gpu/GrSoftwarePathRenderer.h @@ -0,0 +1,38 @@ + +/* + * Copyright 2012 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef GrSoftwarePathRenderer_DEFINED +#define GrSoftwarePathRenderer_DEFINED + +#include "GrPathRenderer.h" + +class GrSoftwarePathRenderer : public GrPathRenderer { +public: + GrSoftwarePathRenderer(GrContext* context) + : fContext(context) { + } + + virtual bool canDrawPath(const SkPath& path, + GrPathFill fill, + const GrDrawTarget* target, + bool antiAlias) const SK_OVERRIDE; +protected: + virtual bool onDrawPath(const SkPath& path, + GrPathFill fill, + const GrVec* translate, + GrDrawTarget* target, + GrDrawState::StageMask stageMask, + bool antiAlias) SK_OVERRIDE; + +private: + GrContext* fContext; + + typedef GrPathRenderer INHERITED; +}; + +#endif |