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

Unified Diff: src/gpu/GrAtlasTextContext.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/core/SkDeviceProperties.h ('k') | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAtlasTextContext.h
diff --git a/src/gpu/GrAtlasTextContext.h b/src/gpu/GrAtlasTextContext.h
index 9a4ef6a928c037c5eaf38951722ca3a87368ca6b..47bb7aeec304171094f0c11135f49e6734fc7d21 100644
--- a/src/gpu/GrAtlasTextContext.h
+++ b/src/gpu/GrAtlasTextContext.h
@@ -25,6 +25,7 @@
class BitmapTextBatch;
class GrDrawContext;
+class GrDrawTarget;
class GrPipelineBuilder;
class GrTextBlobCache;
@@ -34,20 +35,20 @@ class GrTextBlobCache;
*/
class GrAtlasTextContext : public GrTextContext {
public:
- static GrAtlasTextContext* Create(GrContext*, const SkDeviceProperties&,
- bool enableDistanceFields);
+ static GrAtlasTextContext* Create(GrContext*, GrDrawContext*,
+ const SkDeviceProperties&, bool enableDistanceFields);
private:
- GrAtlasTextContext(GrContext*, const SkDeviceProperties&, bool enableDistanceFields);
+ GrAtlasTextContext(GrContext*, GrDrawContext*, const SkDeviceProperties&, bool useDFT);
~GrAtlasTextContext() override {}
bool canDraw(const GrRenderTarget*, const GrClip&, const GrPaint&,
const SkPaint&, const SkMatrix& viewMatrix) override;
- void onDrawText(GrDrawContext*, GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&,
+ void onDrawText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&,
const SkMatrix& viewMatrix, const char text[], size_t byteLength,
SkScalar x, SkScalar y, const SkIRect& regionClipBounds) override;
- void onDrawPosText(GrDrawContext*, GrRenderTarget*, const GrClip&, const GrPaint&,
+ void onDrawPosText(GrRenderTarget*, const GrClip&, const GrPaint&,
const SkPaint&, const SkMatrix& viewMatrix,
const char text[], size_t byteLength,
const SkScalar pos[], int scalarsPerPosition,
@@ -271,7 +272,7 @@ private:
size_t vertexStride, bool useVertexColor,
GrGlyph*);
- inline void flushRunAsPaths(GrDrawContext*, GrRenderTarget*,
+ inline void flushRunAsPaths(GrRenderTarget*,
const SkTextBlob::RunIterator&, const GrClip& clip,
const SkPaint&, SkDrawFilter*,
const SkMatrix& viewMatrix, const SkIRect& clipBounds, SkScalar x,
@@ -280,18 +281,18 @@ private:
int glyphCount, int run, int subRun,
GrColor, SkScalar transX, SkScalar transY,
const SkPaint&);
- inline void flushRun(GrDrawContext*, GrPipelineBuilder*, BitmapTextBlob*, int run, GrColor,
+ inline void flushRun(GrPipelineBuilder*, BitmapTextBlob*, int run, GrColor,
SkScalar transX, SkScalar transY, const SkPaint&);
- inline void flushBigGlyphs(BitmapTextBlob* cacheBlob, GrDrawContext*, GrRenderTarget*,
+ inline void flushBigGlyphs(BitmapTextBlob* cacheBlob, GrRenderTarget*,
const GrClip& clip, const SkPaint& skPaint,
SkScalar transX, SkScalar transY, const SkIRect& clipBounds);
// We have to flush SkTextBlobs differently from drawText / drawPosText
- void flush(GrDrawContext*, const SkTextBlob*, BitmapTextBlob*, GrRenderTarget*,
+ void flush(const SkTextBlob*, BitmapTextBlob*, GrRenderTarget*,
const SkPaint&, const GrPaint&, SkDrawFilter*, const GrClip&,
const SkMatrix& viewMatrix, const SkIRect& clipBounds, SkScalar x, SkScalar y,
SkScalar transX, SkScalar transY);
- void flush(GrDrawContext*, BitmapTextBlob*, GrRenderTarget*, const SkPaint&,
+ void flush(BitmapTextBlob*, GrRenderTarget*, const SkPaint&,
const GrPaint&, const GrClip&, const SkIRect& clipBounds);
// A helper for drawing BitmapText in a run of distance fields
« no previous file with comments | « src/core/SkDeviceProperties.h ('k') | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698