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*>); |
} |