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

Unified Diff: src/gpu/GrDrawingManager.cpp

Issue 1685653004: Move surface props off of GrTextContext (Closed) Base URL: https://skia.googlesource.com/skia.git@tc-cleanup-3
Patch Set: rebase 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.h ('k') | src/gpu/text/GrAtlasTextContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawingManager.cpp
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp
index 9400bcb3871d4a20310c276bd428012823e2457c..5b23b0c694708be0bd1c92f457037e078ee0a9dd 100644
--- a/src/gpu/GrDrawingManager.cpp
+++ b/src/gpu/GrDrawingManager.cpp
@@ -31,12 +31,8 @@ void GrDrawingManager::cleanup() {
delete fNVPRTextContext;
fNVPRTextContext = nullptr;
- for (int i = 0; i < kNumPixelGeometries; ++i) {
- delete fTextContexts[i][0];
- fTextContexts[i][0] = nullptr;
- delete fTextContexts[i][1];
- fTextContexts[i][1] = nullptr;
- }
+ delete fAtlasTextContext;
+ fAtlasTextContext = nullptr;
delete fPathRendererChain;
fPathRendererChain = nullptr;
@@ -118,13 +114,11 @@ void GrDrawingManager::flush() {
fFlushing = false;
}
-GrTextContext* GrDrawingManager::textContext(const SkSurfaceProps& props,
- GrRenderTarget* rt) {
+GrTextContext* GrDrawingManager::textContext(const SkSurfaceProps& props, GrRenderTarget* rt) {
if (this->abandoned()) {
return nullptr;
}
- SkASSERT(props.pixelGeometry() < kNumPixelGeometries);
bool useDIF = props.isUseDeviceIndependentFonts();
if (useDIF && fContext->caps()->shaderCaps()->pathRenderingSupport() &&
@@ -132,18 +126,18 @@ GrTextContext* GrDrawingManager::textContext(const SkSurfaceProps& props,
GrStencilAttachment* sb = fContext->resourceProvider()->attachStencilAttachment(rt);
if (sb) {
if (!fNVPRTextContext) {
- fNVPRTextContext = GrStencilAndCoverTextContext::Create(fContext, props);
+ fNVPRTextContext = GrStencilAndCoverTextContext::Create(fContext);
}
return fNVPRTextContext;
}
}
- if (!fTextContexts[props.pixelGeometry()][useDIF]) {
- fTextContexts[props.pixelGeometry()][useDIF] = GrAtlasTextContext::Create(fContext, props);
+ if (!fAtlasTextContext) {
+ fAtlasTextContext = GrAtlasTextContext::Create(fContext);
}
- return fTextContexts[props.pixelGeometry()][useDIF];
+ return fAtlasTextContext;
}
GrDrawTarget* GrDrawingManager::newDrawTarget(GrRenderTarget* rt) {
« no previous file with comments | « src/gpu/GrDrawingManager.h ('k') | src/gpu/text/GrAtlasTextContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698