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

Unified Diff: src/gpu/text/GrAtlasTextContext.h

Issue 1686143003: Remove GrContext* from GrTextContext (Closed) Base URL: https://skia.googlesource.com/skia.git@tc-cleanup-5-movecontext
Patch Set: cleanup 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 | « src/gpu/GrDrawingManager.cpp ('k') | src/gpu/text/GrAtlasTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/text/GrAtlasTextContext.h
diff --git a/src/gpu/text/GrAtlasTextContext.h b/src/gpu/text/GrAtlasTextContext.h
index f2536b34dba6e2941f4d24885a89aa124ce65580..c4948db8f69821455106025dfed7fc8d27b70575 100644
--- a/src/gpu/text/GrAtlasTextContext.h
+++ b/src/gpu/text/GrAtlasTextContext.h
@@ -31,50 +31,57 @@ class SkGlyph;
*/
class GrAtlasTextContext : public GrTextContext {
public:
- static GrAtlasTextContext* Create(GrContext*);
+ static GrAtlasTextContext* Create();
- bool canDraw(const SkPaint&, const SkMatrix& viewMatrix, const SkSurfaceProps&);
- void drawText(GrDrawContext*, const GrClip&, const GrPaint&, const SkPaint&,
+ bool canDraw(const SkPaint&, const SkMatrix& viewMatrix, const SkSurfaceProps&,
+ const GrShaderCaps&);
+ void drawText(GrContext*, GrDrawContext*, const GrClip&, const GrPaint&, const SkPaint&,
const SkMatrix& viewMatrix, const SkSurfaceProps&, const char text[],
size_t byteLength, SkScalar x, SkScalar y,
const SkIRect& regionClipBounds) override;
- void drawPosText(GrDrawContext*, const GrClip&, const GrPaint&,
+ void drawPosText(GrContext*, GrDrawContext*, const GrClip&, const GrPaint&,
const SkPaint&, const SkMatrix& viewMatrix, const SkSurfaceProps&,
const char text[], size_t byteLength,
const SkScalar pos[], int scalarsPerPosition,
const SkPoint& offset, const SkIRect& regionClipBounds) override;
- void drawTextBlob(GrDrawContext*, const GrClip&, const SkPaint&,
+ void drawTextBlob(GrContext*, GrDrawContext*, const GrClip&, const SkPaint&,
const SkMatrix& viewMatrix, const SkSurfaceProps&, const SkTextBlob*,
SkScalar x, SkScalar y,
SkDrawFilter*, const SkIRect& clipBounds) override;
private:
- GrAtlasTextContext(GrContext*);
+ GrAtlasTextContext();
// sets up the descriptor on the blob and returns a detached cache. Client must attach
inline static GrColor ComputeCanonicalColor(const SkPaint&, bool lcd);
- void regenerateTextBlob(GrAtlasTextBlob* bmp, const SkPaint& skPaint, GrColor,
- const SkMatrix& viewMatrix,
- const SkSurfaceProps&,
- const SkTextBlob* blob, SkScalar x, SkScalar y,
- SkDrawFilter* drawFilter);
+ static void RegenerateTextBlob(GrAtlasTextBlob* bmp,
+ GrBatchFontCache*,
+ const GrShaderCaps&,
+ const SkPaint& skPaint, GrColor,
+ const SkMatrix& viewMatrix,
+ const SkSurfaceProps&,
+ const SkTextBlob* blob, SkScalar x, SkScalar y,
+ SkDrawFilter* drawFilter);
inline static bool HasLCD(const SkTextBlob*);
- // Test methods
- inline GrAtlasTextBlob* createDrawTextBlob(const GrPaint&,
- const SkPaint&, const SkMatrix& viewMatrix,
- const SkSurfaceProps&,
- const char text[], size_t byteLength,
- SkScalar x, SkScalar y);
- inline GrAtlasTextBlob* createDrawPosTextBlob(const GrPaint&,
- const SkPaint&, const SkMatrix& viewMatrix,
- const SkSurfaceProps&,
- const char text[], size_t byteLength,
- const SkScalar pos[], int scalarsPerPosition,
- const SkPoint& offset);
+ static inline GrAtlasTextBlob* CreateDrawTextBlob(GrTextBlobCache*,
+ GrBatchFontCache*, const GrShaderCaps&,
+ const GrPaint&,
+ const SkPaint&, const SkMatrix& viewMatrix,
+ const SkSurfaceProps&,
+ const char text[], size_t byteLength,
+ SkScalar x, SkScalar y);
+ static inline GrAtlasTextBlob* CreateDrawPosTextBlob(GrTextBlobCache*, GrBatchFontCache*,
+ const GrShaderCaps&,
+ const GrPaint&,
+ const SkPaint&, const SkMatrix& viewMatrix,
+ const SkSurfaceProps&,
+ const char text[], size_t byteLength,
+ const SkScalar pos[],
+ int scalarsPerPosition,
+ const SkPoint& offset);
const GrDistanceFieldAdjustTable* dfAdjustTable() const { return fDistanceAdjustTable; }
- GrTextBlobCache* fCache;
SkAutoTUnref<const GrDistanceFieldAdjustTable> fDistanceAdjustTable;
#ifdef GR_TEST_UTILS
« no previous file with comments | « src/gpu/GrDrawingManager.cpp ('k') | src/gpu/text/GrAtlasTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698