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

Unified Diff: src/gpu/GrTextContext.h

Issue 936943002: Pass clip to context (Closed) Base URL: https://skia.googlesource.com/skia.git@pass_down_rendertarget
Patch Set: feedback inc Created 5 years, 10 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
Index: src/gpu/GrTextContext.h
diff --git a/src/gpu/GrTextContext.h b/src/gpu/GrTextContext.h
index 581ff64837f55bff47bb02d619fda5d1b972b66a..d333c631413f751d3b89378f921b4dee815e9994 100644
--- a/src/gpu/GrTextContext.h
+++ b/src/gpu/GrTextContext.h
@@ -15,6 +15,7 @@
#include "SkPostConfig.h"
+class GrClip;
class GrContext;
class GrDrawTarget;
class GrFontScaler;
@@ -26,9 +27,11 @@ class GrTextContext {
public:
virtual ~GrTextContext();
- bool drawText(GrRenderTarget* rt, const GrPaint&, const SkPaint&, const SkMatrix& viewMatrix,
- const char text[], size_t byteLength, SkScalar x, SkScalar y);
- bool drawPosText(GrRenderTarget* rt, const GrPaint&, const SkPaint&, const SkMatrix& viewMatrix,
+ bool drawText(GrRenderTarget* rt, const GrClip&, const GrPaint&, const SkPaint&,
+ const SkMatrix& viewMatrix, const char text[], size_t byteLength, SkScalar x,
+ SkScalar y);
+ bool drawPosText(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);
@@ -39,7 +42,7 @@ protected:
SkDeviceProperties fDeviceProperties;
SkAutoTUnref<GrRenderTarget> fRenderTarget;
- const GrClip* fClip;
+ GrClip fClip;
GrDrawTarget* fDrawTarget;
SkIRect fClipRect;
GrPaint fPaint;
@@ -49,16 +52,16 @@ protected:
virtual bool canDraw(const SkPaint& paint, const SkMatrix& viewMatrix) = 0;
- virtual void onDrawText(GrRenderTarget*, const GrPaint&, const SkPaint&,
+ virtual void onDrawText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&,
const SkMatrix& viewMatrix, const char text[], size_t byteLength,
SkScalar x, SkScalar y) = 0;
- virtual void onDrawPosText(GrRenderTarget*, const GrPaint&, const SkPaint&,
+ 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) = 0;
- void init(GrRenderTarget*, const GrPaint&, const SkPaint&);
+ void init(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&);
void finish() { fDrawTarget = NULL; }
static GrFontScaler* GetGrFontScaler(SkGlyphCache* cache);

Powered by Google App Engine
This is Rietveld 408576698