aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrSoftwarePathRenderer.h
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-04-27 12:08:47 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-04-27 12:08:47 +0000
commitf4c2c527dd3cab979621fdfbc07eb22fee103472 (patch)
treef73dbdf1a28609c7f83b65fb09ae2499f6bfaf92 /src/gpu/GrSoftwarePathRenderer.h
parentfa0588ff672564af1c235a63589573829035a60b (diff)
First portion of refactoring to bundle SW path rendering into GrPathRenderer
Diffstat (limited to 'src/gpu/GrSoftwarePathRenderer.h')
-rw-r--r--src/gpu/GrSoftwarePathRenderer.h38
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