Add GrTextUtils::Target
This abstracts the portion of GrRenderTargetContext that is used by GrAtlasTextContext and opens the door to creating alternative consumers of GrAtlasTextOps.
Change-Id: Iaa48f93f4d7d49e231744d44427e9396c5d36fe7
Reviewed-on: https://skia-review.googlesource.com/64760
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/text/GrAtlasTextContext.h b/src/gpu/text/GrAtlasTextContext.h
index f9540de..905adc0 100644
--- a/src/gpu/text/GrAtlasTextContext.h
+++ b/src/gpu/text/GrAtlasTextContext.h
@@ -19,7 +19,6 @@
#endif
class GrDrawOp;
-class GrRenderTargetContext;
class GrTextBlobCache;
class SkGlyph;
@@ -33,17 +32,16 @@
bool canDraw(const SkPaint&, const SkMatrix& viewMatrix, const SkSurfaceProps&,
const GrShaderCaps&);
- void drawText(GrContext*, GrRenderTargetContext*, const GrClip&, const SkPaint&,
+ void drawText(GrContext*, GrTextUtils::Target*, const GrClip&, const SkPaint&,
const SkMatrix& viewMatrix, const SkSurfaceProps&, const char text[],
size_t byteLength, SkScalar x, SkScalar y, const SkIRect& regionClipBounds);
- void drawPosText(GrContext*, GrRenderTargetContext*, const GrClip&, const SkPaint&,
+ void drawPosText(GrContext*, GrTextUtils::Target*, const GrClip&, const SkPaint&,
const SkMatrix& viewMatrix, const SkSurfaceProps&, const char text[],
size_t byteLength, const SkScalar pos[], int scalarsPerPosition,
const SkPoint& offset, const SkIRect& regionClipBounds);
- void drawTextBlob(GrContext*, GrRenderTargetContext*, const GrClip&, const SkPaint&,
+ void drawTextBlob(GrContext*, GrTextUtils::Target*, const GrClip&, const SkPaint&,
const SkMatrix& viewMatrix, const SkSurfaceProps&, const SkTextBlob*,
- SkScalar x, SkScalar y,
- SkDrawFilter*, const SkIRect& clipBounds);
+ SkScalar x, SkScalar y, SkDrawFilter*, const SkIRect& clipBounds);
private:
GrAtlasTextContext();