joshualitt | 96880d9 | 2016-02-16 10:36:53 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #ifndef GrPathRenderingDrawContext_DEFINED |
| 9 | #define GrPathRenderingDrawContext_DEFINED |
| 10 | |
| 11 | #include "GrDrawContext.h" |
| 12 | |
| 13 | class GrStencilAndCoverTextContext; |
| 14 | |
| 15 | class GrPathRenderingDrawContext : public GrDrawContext { |
| 16 | public: |
| 17 | void drawText(const GrClip&, const GrPaint&, const SkPaint&, |
| 18 | const SkMatrix& viewMatrix, const char text[], size_t byteLength, |
| 19 | SkScalar x, SkScalar y, const SkIRect& clipBounds) override; |
| 20 | void drawPosText(const GrClip&, const GrPaint&, const SkPaint&, |
| 21 | const SkMatrix& viewMatrix, const char text[], size_t byteLength, |
| 22 | const SkScalar pos[], int scalarsPerPosition, |
| 23 | const SkPoint& offset, const SkIRect& clipBounds) override; |
| 24 | void drawTextBlob(const GrClip&, const SkPaint&, |
| 25 | const SkMatrix& viewMatrix, const SkTextBlob*, |
| 26 | SkScalar x, SkScalar y, |
| 27 | SkDrawFilter*, const SkIRect& clipBounds) override; |
| 28 | protected: |
| 29 | GrPathRenderingDrawContext(GrContext* ctx, GrDrawingManager* mgr, GrRenderTarget* rt, |
| 30 | const SkSurfaceProps* surfaceProps, GrAuditTrail* at, |
| 31 | GrSingleOwner* so) |
joshualitt | 8db8678 | 2016-02-17 05:40:00 -0800 | [diff] [blame^] | 32 | : INHERITED(ctx, mgr, rt, surfaceProps, at, so) {} |
joshualitt | 96880d9 | 2016-02-16 10:36:53 -0800 | [diff] [blame] | 33 | |
| 34 | private: |
joshualitt | 8db8678 | 2016-02-17 05:40:00 -0800 | [diff] [blame^] | 35 | SkAutoTDelete<GrStencilAndCoverTextContext> fStencilAndCoverTextContext; |
joshualitt | 96880d9 | 2016-02-16 10:36:53 -0800 | [diff] [blame] | 36 | |
| 37 | friend class GrDrawingManager; // for ctor |
| 38 | |
| 39 | typedef GrDrawContext INHERITED; |
| 40 | }; |
| 41 | |
| 42 | #endif |