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

Unified Diff: src/gpu/text/GrStencilAndCoverTextContext.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/text/GrStencilAndCoverTextContext.cpp
diff --git a/src/gpu/text/GrStencilAndCoverTextContext.cpp b/src/gpu/text/GrStencilAndCoverTextContext.cpp
index e9677df1efdba6903b2dd34bb494e9e19b2fca8d..6c5be0a9cb4ed4dc3b60562f81f3bd28a8cb86f8 100644
--- a/src/gpu/text/GrStencilAndCoverTextContext.cpp
+++ b/src/gpu/text/GrStencilAndCoverTextContext.cpp
@@ -37,21 +37,17 @@ template<typename T> static void delete_hash_table_entry(T* val) {
delete *val;
}
-GrStencilAndCoverTextContext::GrStencilAndCoverTextContext()
- : fFallbackTextContext(nullptr)
+GrStencilAndCoverTextContext::GrStencilAndCoverTextContext(GrAtlasTextContext* fallbackTextContext)
+ : fFallbackTextContext(fallbackTextContext)
, fCacheSize(0) {
}
GrStencilAndCoverTextContext*
-GrStencilAndCoverTextContext::Create() {
- GrStencilAndCoverTextContext* textContext = new GrStencilAndCoverTextContext();
- textContext->fFallbackTextContext = GrAtlasTextContext::Create();
-
- return textContext;
+GrStencilAndCoverTextContext::Create(GrAtlasTextContext* fallbackTextContext) {
+ return new GrStencilAndCoverTextContext(fallbackTextContext);;
}
GrStencilAndCoverTextContext::~GrStencilAndCoverTextContext() {
- delete fFallbackTextContext;
fBlobIdCache.foreach(delete_hash_map_entry<uint32_t, TextBlob*>);
fBlobKeyCache.foreach(delete_hash_table_entry<TextBlob*>);
}
« src/gpu/GrDrawingManager.cpp ('K') | « src/gpu/text/GrStencilAndCoverTextContext.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698