aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPathRenderingDrawContext.h
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2016-02-16 10:36:53 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-02-16 10:36:53 -0800
commit96880d9e366d58e5960aa0ee6aa67260797679eb (patch)
tree4aec09d45ade79453eaedb86b676b9dbf5d60952 /src/gpu/GrPathRenderingDrawContext.h
parent3341d428d3e49803e4f31f439a193e9e2c199daa (diff)
Create GrPathRenderingDrawContext
Diffstat (limited to 'src/gpu/GrPathRenderingDrawContext.h')
-rw-r--r--src/gpu/GrPathRenderingDrawContext.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/gpu/GrPathRenderingDrawContext.h b/src/gpu/GrPathRenderingDrawContext.h
new file mode 100644
index 0000000000..ab36955ae0
--- /dev/null
+++ b/src/gpu/GrPathRenderingDrawContext.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2016 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef GrPathRenderingDrawContext_DEFINED
+#define GrPathRenderingDrawContext_DEFINED
+
+#include "GrDrawContext.h"
+
+class GrStencilAndCoverTextContext;
+
+class GrPathRenderingDrawContext : public GrDrawContext {
+public:
+ void drawText(const GrClip&, const GrPaint&, const SkPaint&,
+ const SkMatrix& viewMatrix, const char text[], size_t byteLength,
+ SkScalar x, SkScalar y, const SkIRect& clipBounds) override;
+ void drawPosText(const GrClip&, const GrPaint&, const SkPaint&,
+ const SkMatrix& viewMatrix, const char text[], size_t byteLength,
+ const SkScalar pos[], int scalarsPerPosition,
+ const SkPoint& offset, const SkIRect& clipBounds) override;
+ void drawTextBlob(const GrClip&, const SkPaint&,
+ const SkMatrix& viewMatrix, const SkTextBlob*,
+ SkScalar x, SkScalar y,
+ SkDrawFilter*, const SkIRect& clipBounds) override;
+protected:
+ GrPathRenderingDrawContext(GrContext* ctx, GrDrawingManager* mgr, GrRenderTarget* rt,
+ const SkSurfaceProps* surfaceProps, GrAuditTrail* at,
+ GrSingleOwner* so)
+ : INHERITED(ctx, mgr, rt, surfaceProps, at, so)
+ , fStencilAndCoverTextContext(nullptr) {}
+
+private:
+ GrStencilAndCoverTextContext* fStencilAndCoverTextContext;
+
+ friend class GrDrawingManager; // for ctor
+
+ typedef GrDrawContext INHERITED;
+};
+
+#endif