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

Unified Diff: include/gpu/GrDrawContext.h

Issue 1701013002: Create GrPathRenderingDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 4 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
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrDrawContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrDrawContext.h
diff --git a/include/gpu/GrDrawContext.h b/include/gpu/GrDrawContext.h
index 4c884154e3b0651c6c96fcd35482c8944a8ba688..bf0de334ab195866963af6b6533fba19c3c37498 100644
--- a/include/gpu/GrDrawContext.h
+++ b/include/gpu/GrDrawContext.h
@@ -52,17 +52,17 @@ public:
// TODO: it is odd that we need both the SkPaint in the following 3 methods.
// We should extract the text parameters from SkPaint and pass them separately
// akin to GrStrokeInfo (GrTextInfo?)
- void drawText(const GrClip&, const GrPaint&, const SkPaint&,
- const SkMatrix& viewMatrix, const char text[], size_t byteLength,
- SkScalar x, SkScalar y, const SkIRect& clipBounds);
- void drawPosText(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);
- void drawTextBlob(const GrClip&, const SkPaint&,
- const SkMatrix& viewMatrix, const SkTextBlob*,
- SkScalar x, SkScalar y,
- SkDrawFilter*, const SkIRect& clipBounds);
+ virtual void drawText(const GrClip&, const GrPaint&, const SkPaint&,
+ const SkMatrix& viewMatrix, const char text[], size_t byteLength,
+ SkScalar x, SkScalar y, const SkIRect& clipBounds);
+ virtual void drawPosText(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(const GrClip&, const SkPaint&,
+ const SkMatrix& viewMatrix, const SkTextBlob*,
+ SkScalar x, SkScalar y,
+ SkDrawFilter*, const SkIRect& clipBounds);
/**
* Provides a perfomance hint that the render target's contents are allowed
@@ -282,14 +282,20 @@ public:
// Functions intended for internal use only.
void internal_drawBatch(const GrPipelineBuilder& pipelineBuilder, GrDrawBatch* batch);
-private:
- friend class GrAtlasTextBlob; // for access to drawBatch
- friend class GrDrawingManager; // for ctor
+protected:
+ GrDrawContext(GrContext*, GrDrawingManager*, GrRenderTarget*,
+ const SkSurfaceProps* surfaceProps, GrAuditTrail*, GrSingleOwner*);
+ GrDrawingManager* drawingManager() { return fDrawingManager; }
+ GrAuditTrail* auditTrail() { return fAuditTrail; }
+ const SkSurfaceProps& surfaceProps() const { return fSurfaceProps; }
+
+ SkDEBUGCODE(GrSingleOwner* singleOwner() { return fSingleOwner; })
SkDEBUGCODE(void validate() const;)
- GrDrawContext(GrContext*, GrDrawingManager*, GrRenderTarget*,
- const SkSurfaceProps* surfaceProps, GrAuditTrail*, GrSingleOwner*);
+private:
+ friend class GrAtlasTextBlob; // for access to drawBatch
+ friend class GrDrawingManager; // for ctor
void internalDrawPath(GrPipelineBuilder*,
const SkMatrix& viewMatrix,
@@ -310,7 +316,7 @@ private:
// In MDB-mode the drawTarget can be closed by some other drawContext that has picked
// it up. For this reason, the drawTarget should only ever be accessed via 'getDrawTarget'.
GrDrawTarget* fDrawTarget;
- GrTextContext* fTextContext; // lazily gotten from GrContext::DrawingManager
+ GrTextContext* fAtlasTextContext; // lazily gotten from GrContext::DrawingManager
GrContext* fContext;
SkSurfaceProps fSurfaceProps;
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrDrawContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698