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

Unified Diff: src/gpu/GrTextContext.h

Issue 1175553002: Make GrTextContext be owned by the GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix nvpr config Created 5 years, 6 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 f4c0982ed4393b0e9ce2b0eb7bbeeec7cbc5fb78..775203e544f61faf3ca15eeee4a8e988a4abdb37 100644
--- a/src/gpu/GrTextContext.h
+++ b/src/gpu/GrTextContext.h
@@ -48,6 +48,7 @@ protected:
GrContext* fContext;
SkDeviceProperties fDeviceProperties;
+ GrDrawContext* fDrawContext; // owning drawContext
SkAutoTUnref<GrRenderTarget> fRenderTarget;
GrClip fClip;
SkIRect fClipRect;
@@ -55,27 +56,27 @@ protected:
GrPaint fPaint;
SkPaint fSkPaint;
- GrTextContext(GrContext*, const SkDeviceProperties&);
+ GrTextContext(GrContext*, GrDrawContext*, const SkDeviceProperties&);
virtual bool canDraw(const GrRenderTarget*, const GrClip&, const GrPaint&,
const SkPaint&, const SkMatrix& viewMatrix) = 0;
- virtual void onDrawText(GrDrawContext*, GrRenderTarget*, const GrClip&,
+ virtual void onDrawText(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(GrDrawContext*, GrRenderTarget*, const GrClip&,
+ virtual void onDrawPosText(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(GrDrawContext*, GrRenderTarget*, const GrClip& clip,
+ void drawTextAsPath(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(GrDrawContext*, GrRenderTarget*, const GrClip& clip,
+ void drawPosTextAsPath(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