aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/text
diff options
context:
space:
mode:
authorGravatar Herb Derby <herb@google.com>2017-04-10 11:25:30 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-13 18:33:02 +0000
commit9428a37255586da6d34b86c6ed0d56729dbfd731 (patch)
tree5c047b77435319345d4151d9d67417f17d67db8e /src/gpu/text
parent6ad59789e7153c0c427d5409e8eb8ec61494931a (diff)
Move GrAtlasGlyphCache over to SkArenaAlloc from SkVarAlloc.
Change-Id: Ibeee7235d30c68be9fd4f68ecf30a65c7ecb78f5 Reviewed-on: https://skia-review.googlesource.com/13020 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Herb Derby <herb@google.com>
Diffstat (limited to 'src/gpu/text')
-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;