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

Unified Diff: src/gpu/GrDrawContext.cpp

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 | « include/gpu/GrDrawContext.h ('k') | src/gpu/GrDrawingManager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawContext.cpp
diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp
index d971f58ece1ce20156cf6a225e7b263ec8030966..f31e0b23b090917d5148fb1a8fbaa86876bda30a 100644
--- a/src/gpu/GrDrawContext.cpp
+++ b/src/gpu/GrDrawContext.cpp
@@ -59,7 +59,7 @@ GrDrawContext::GrDrawContext(GrContext* context,
: fDrawingManager(drawingMgr)
, fRenderTarget(rt)
, fDrawTarget(SkSafeRef(rt->getLastDrawTarget()))
- , fTextContext(nullptr)
+ , fAtlasTextContext(nullptr)
, fContext(context)
, fSurfaceProps(SkSurfacePropsCopyOrDefault(surfaceProps))
, fAuditTrail(auditTrail)
@@ -116,12 +116,12 @@ void GrDrawContext::drawText(const GrClip& clip, const GrPaint& grPaint,
SkDEBUGCODE(this->validate();)
GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::drawText");
- if (!fTextContext) {
- fTextContext = fDrawingManager->textContext(fSurfaceProps, fRenderTarget);
+ if (!fAtlasTextContext) {
+ fAtlasTextContext = GrAtlasTextContext::Create();
}
- fTextContext->drawText(fContext, this, clip, grPaint, skPaint, viewMatrix, fSurfaceProps,
- text, byteLength, x, y, clipBounds);
+ fAtlasTextContext->drawText(fContext, this, clip, grPaint, skPaint, viewMatrix, fSurfaceProps,
+ text, byteLength, x, y, clipBounds);
}
void GrDrawContext::drawPosText(const GrClip& clip, const GrPaint& grPaint,
@@ -135,12 +135,13 @@ void GrDrawContext::drawPosText(const GrClip& clip, const GrPaint& grPaint,
SkDEBUGCODE(this->validate();)
GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::drawPosText");
- if (!fTextContext) {
- fTextContext = fDrawingManager->textContext(fSurfaceProps, fRenderTarget);
+ if (!fAtlasTextContext) {
+ fAtlasTextContext = GrAtlasTextContext::Create();
}
- fTextContext->drawPosText(fContext, this, clip, grPaint, skPaint, viewMatrix, fSurfaceProps,
- text, byteLength, pos, scalarsPerPosition, offset, clipBounds);
+ fAtlasTextContext->drawPosText(fContext, this, clip, grPaint, skPaint, viewMatrix,
+ fSurfaceProps, text, byteLength, pos, scalarsPerPosition,
+ offset, clipBounds);
}
@@ -153,12 +154,12 @@ void GrDrawContext::drawTextBlob(const GrClip& clip, const SkPaint& skPaint,
SkDEBUGCODE(this->validate();)
GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::drawTextBlob");
- if (!fTextContext) {
- fTextContext = fDrawingManager->textContext(fSurfaceProps, fRenderTarget);
+ if (!fAtlasTextContext) {
+ fAtlasTextContext = GrAtlasTextContext::Create();
}
- fTextContext->drawTextBlob(fContext, this, clip, skPaint, viewMatrix, fSurfaceProps, blob, x,
- y, filter, clipBounds);
+ fAtlasTextContext->drawTextBlob(fContext, this, clip, skPaint, viewMatrix, fSurfaceProps, blob,
+ x, y, filter, clipBounds);
}
void GrDrawContext::discard() {
« no previous file with comments | « include/gpu/GrDrawContext.h ('k') | src/gpu/GrDrawingManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698