Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Unified Diff: src/gpu/GrTextContext.h

Issue 1320323004: Make GrTextContext no longer store a GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add newline Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrStencilAndCoverTextContext.cpp ('k') | src/gpu/GrTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTextContext.h
diff --git a/src/gpu/GrTextContext.h b/src/gpu/GrTextContext.h
index aeb599114b6d0f5415c01e0c3ddf13f1c955aff6..c1e8af549687b9093550258eceb9a1e6bbe3f9b2 100644
--- a/src/gpu/GrTextContext.h
+++ b/src/gpu/GrTextContext.h
@@ -28,15 +28,17 @@ class GrTextContext {
public:
virtual ~GrTextContext();
- void drawText(GrRenderTarget* rt, const GrClip&, const GrPaint&, const SkPaint&,
+ void drawText(GrDrawContext* dc, GrRenderTarget* rt,
+ const GrClip&, const GrPaint&, const SkPaint&,
const SkMatrix& viewMatrix, const char text[], size_t byteLength, SkScalar x,
SkScalar y, const SkIRect& clipBounds);
- void drawPosText(GrRenderTarget* rt, const GrClip&, const GrPaint&, const SkPaint&,
+ void drawPosText(GrDrawContext* dc, GrRenderTarget* rt,
+ 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);
- virtual void drawTextBlob(GrRenderTarget*, const GrClip&, const SkPaint&,
+ virtual void drawTextBlob(GrDrawContext* dc, GrRenderTarget*, const GrClip&, const SkPaint&,
const SkMatrix& viewMatrix, const SkTextBlob*,
SkScalar x, SkScalar y,
SkDrawFilter*, const SkIRect& clipBounds);
@@ -48,29 +50,27 @@ protected:
GrContext* fContext;
SkSurfaceProps fSurfaceProps;
- GrDrawContext* fDrawContext; // owning drawContext
-
- GrTextContext(GrContext*, GrDrawContext*, const SkSurfaceProps&);
+ GrTextContext(GrContext*, const SkSurfaceProps&);
virtual bool canDraw(const GrRenderTarget*, const GrClip&, const GrPaint&,
const SkPaint&, const SkMatrix& viewMatrix) = 0;
- virtual void onDrawText(GrRenderTarget*, const GrClip&,
+ virtual void onDrawText(GrDrawContext*, GrRenderTarget*, const GrClip&,
const GrPaint&, const SkPaint&,
const SkMatrix& viewMatrix, const char text[], size_t byteLength,
SkScalar x, SkScalar y, const SkIRect& clipBounds) = 0;
- virtual void onDrawPosText(GrRenderTarget*, const GrClip&,
+ virtual void onDrawPosText(GrDrawContext*, GrRenderTarget*, 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) = 0;
- void drawTextAsPath(GrRenderTarget*, const GrClip& clip,
+ void drawTextAsPath(GrDrawContext*, GrRenderTarget*, const GrClip& clip,
const SkPaint& origPaint, const SkMatrix& viewMatrix,
const char text[], size_t byteLength, SkScalar x, SkScalar y,
const SkIRect& clipBounds);
- void drawPosTextAsPath(GrRenderTarget*, const GrClip& clip,
+ void drawPosTextAsPath(GrDrawContext*, GrRenderTarget*, const GrClip& clip,
const SkPaint& origPaint, const SkMatrix& viewMatrix,
const char text[], size_t byteLength,
const SkScalar pos[], int scalarsPerPosition,
« no previous file with comments | « src/gpu/GrStencilAndCoverTextContext.cpp ('k') | src/gpu/GrTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698