aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/batches/GrStencilAndCoverPathRenderer.h
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2015-09-01 06:50:55 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-09-01 06:50:55 -0700
commit6335a729769b06f0d6a1450c7c02e03f95bbb049 (patch)
tree86463f9ac9a06a6cc7d333e3cfcdfe602245f8b7 /src/gpu/batches/GrStencilAndCoverPathRenderer.h
parentfbccb5995dcda645a3a8af51805639cb0c0d2300 (diff)
Move PathRenderers to batches folder
Diffstat (limited to 'src/gpu/batches/GrStencilAndCoverPathRenderer.h')
-rw-r--r--src/gpu/batches/GrStencilAndCoverPathRenderer.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/gpu/batches/GrStencilAndCoverPathRenderer.h b/src/gpu/batches/GrStencilAndCoverPathRenderer.h
new file mode 100644
index 0000000000..bb8cdb0dd7
--- /dev/null
+++ b/src/gpu/batches/GrStencilAndCoverPathRenderer.h
@@ -0,0 +1,45 @@
+
+/*
+ * 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 GrBuiltInPathRenderer_DEFINED
+#define GrBuiltInPathRenderer_DEFINED
+
+#include "GrPathRenderer.h"
+
+class GrContext;
+class GrGpu;
+
+/**
+ * Uses GrGpu::stencilPath followed by a cover rectangle. This subclass doesn't apply AA; it relies
+ * on the target having MSAA if AA is desired.
+ */
+class GrStencilAndCoverPathRenderer : public GrPathRenderer {
+public:
+
+ static GrPathRenderer* Create(GrResourceProvider*, const GrCaps&);
+
+
+private:
+ StencilSupport onGetStencilSupport(const SkPath&, const GrStrokeInfo&) const override {
+ return GrPathRenderer::kStencilOnly_StencilSupport;
+ }
+
+ bool onCanDrawPath(const CanDrawPathArgs&) const override;
+
+ bool onDrawPath(const DrawPathArgs&) override;
+
+ void onStencilPath(const StencilPathArgs&) override;
+
+ GrStencilAndCoverPathRenderer(GrResourceProvider*);
+
+ GrResourceProvider* fResourceProvider;
+
+ typedef GrPathRenderer INHERITED;
+};
+
+#endif