aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/gpu/text/GrAtlasGlyphCache.cpp2
-rw-r--r--src/gpu/text/GrAtlasGlyphCache.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/gpu/text/GrAtlasGlyphCache.cpp b/src/gpu/text/GrAtlasGlyphCache.cpp
index 213ecfc3da..0b364f43fe 100644
--- a/src/gpu/text/GrAtlasGlyphCache.cpp
+++ b/src/gpu/text/GrAtlasGlyphCache.cpp
@@ -413,7 +413,7 @@ GrGlyph* GrAtlasTextStrike::generateGlyph(const SkGlyph& skGlyph, GrGlyph::Packe
}
GrMaskFormat format = get_packed_glyph_mask_format(skGlyph);
- GrGlyph* glyph = (GrGlyph*)fPool.alloc(sizeof(GrGlyph));
+ GrGlyph* glyph = fPool.make<GrGlyph>();
glyph->init(packed, bounds, format);
fCache.add(glyph);
return glyph;
diff --git a/src/gpu/text/GrAtlasGlyphCache.h b/src/gpu/text/GrAtlasGlyphCache.h
index 9e97966952..a75600b615 100644
--- a/src/gpu/text/GrAtlasGlyphCache.h
+++ b/src/gpu/text/GrAtlasGlyphCache.h
@@ -11,9 +11,9 @@
#include "GrCaps.h"
#include "GrDrawOpAtlas.h"
#include "GrGlyph.h"
+#include "SkArenaAlloc.h"
#include "SkGlyphCache.h"
#include "SkTDynamicHash.h"
-#include "SkVarAlloc.h"
class GrAtlasGlyphCache;
class GrGpu;
@@ -85,7 +85,7 @@ public:
private:
SkTDynamicHash<GrGlyph, GrGlyph::PackedID> fCache;
SkAutoDescriptor fFontScalerKey;
- SkVarAlloc fPool;
+ SkArenaAlloc fPool{512};
GrAtlasGlyphCache* fAtlasGlyphCache;
int fAtlasedGlyphs;