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

Unified Diff: src/gpu/GrContext.cpp

Issue 650273003: Change GrTextContext fallbacks to be a linked list chain. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | src/gpu/GrTextContext.h » ('j') | src/gpu/GrTextContext.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrContext.cpp
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 6ece67fd10a19beb1e00fa8debfa1ad4d63878a8..11ebef4eaa620cd1a48a8b20ddf6cc0ba22b03fd 100755
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -13,6 +13,7 @@
#include "effects/GrSingleTextureEffect.h"
#include "GrAARectRenderer.h"
+#include "GrBitmapTextContext.h"
#include "GrBufferAllocPool.h"
#include "GrGpu.h"
#include "GrDistanceFieldTextContext.h"
@@ -250,13 +251,18 @@ GrTextContext* GrContext::createTextContext(GrRenderTarget* renderTarget,
const SkDeviceProperties&
leakyProperties,
bool enableDistanceFieldFonts) {
- if (fGpu->caps()->pathRenderingSupport()) {
- if (renderTarget->getStencilBuffer() && renderTarget->isMultisampled()) {
- return SkNEW_ARGS(GrStencilAndCoverTextContext, (this, leakyProperties));
- }
+ GrTextContext* mainTextContext;
+ if (fGpu->caps()->pathRenderingSupport() && renderTarget->getStencilBuffer() &&
+ renderTarget->isMultisampled()) {
+ mainTextContext = SkNEW_ARGS(GrStencilAndCoverTextContext, (this, leakyProperties));
+ } else {
+ mainTextContext = SkNEW_ARGS(GrDistanceFieldTextContext, (this, leakyProperties,
+ enableDistanceFieldFonts));
}
- return SkNEW_ARGS(GrDistanceFieldTextContext, (this, leakyProperties,
- enableDistanceFieldFonts));
+ mainTextContext->setFallbackTextContext(
+ SkNEW_ARGS(GrBitmapTextContext, (this, leakyProperties)));
+
+ return mainTextContext;
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « no previous file | src/gpu/GrTextContext.h » ('j') | src/gpu/GrTextContext.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698