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

Unified Diff: src/gpu/GrPathRenderingDrawContext.cpp

Issue 2240623002: Move GrAtlasTextContext to GrDrawingManager, so we only have one. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix alignment Created 4 years, 4 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/GrPathRenderingDrawContext.cpp
diff --git a/src/gpu/GrPathRenderingDrawContext.cpp b/src/gpu/GrPathRenderingDrawContext.cpp
index becffe01794bba597659b4f437304b7ef58a0c8b..1380f7dc78a5b85ad0e109b8fe159e4dde5a25fa 100644
--- a/src/gpu/GrPathRenderingDrawContext.cpp
+++ b/src/gpu/GrPathRenderingDrawContext.cpp
@@ -26,7 +26,8 @@ void GrPathRenderingDrawContext::drawText(const GrClip& clip, const GrPaint& gr
GR_AUDIT_TRAIL_AUTO_FRAME(this->auditTrail(), "GrPathRenderingDrawContext::drawText");
if (!fStencilAndCoverTextContext) {
- fStencilAndCoverTextContext.reset(GrStencilAndCoverTextContext::Create());
+ GrAtlasTextContext* fallbackContext = this->drawingManager()->getAtlasTextContext();
+ fStencilAndCoverTextContext.reset(GrStencilAndCoverTextContext::Create(fallbackContext));
}
fStencilAndCoverTextContext->drawText(this->drawingManager()->getContext(), this, clip, grPaint,
@@ -46,7 +47,8 @@ void GrPathRenderingDrawContext::drawPosText(const GrClip& clip, const GrPaint&
GR_AUDIT_TRAIL_AUTO_FRAME(this->auditTrail(), "GrPathRenderingDrawContext::drawPosText");
if (!fStencilAndCoverTextContext) {
- fStencilAndCoverTextContext.reset(GrStencilAndCoverTextContext::Create());
+ GrAtlasTextContext* fallbackContext = this->drawingManager()->getAtlasTextContext();
+ fStencilAndCoverTextContext.reset(GrStencilAndCoverTextContext::Create(fallbackContext));
}
fStencilAndCoverTextContext->drawPosText(this->drawingManager()->getContext(), this, clip,
@@ -65,7 +67,8 @@ void GrPathRenderingDrawContext::drawTextBlob(const GrClip& clip, const SkPaint&
GR_AUDIT_TRAIL_AUTO_FRAME(this->auditTrail(), "GrPathRenderingDrawContext::drawTextBlob");
if (!fStencilAndCoverTextContext) {
- fStencilAndCoverTextContext.reset(GrStencilAndCoverTextContext::Create());
+ GrAtlasTextContext* fallbackContext = this->drawingManager()->getAtlasTextContext();
+ fStencilAndCoverTextContext.reset(GrStencilAndCoverTextContext::Create(fallbackContext));
}
fStencilAndCoverTextContext->drawTextBlob(this->drawingManager()->getContext(), this, clip,

Powered by Google App Engine
This is Rietveld 408576698