aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/text/GrGlyphCache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/text/GrGlyphCache.cpp')
-rw-r--r--src/gpu/text/GrGlyphCache.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gpu/text/GrGlyphCache.cpp b/src/gpu/text/GrGlyphCache.cpp
index 49e24b8b8c..79f7748def 100644
--- a/src/gpu/text/GrGlyphCache.cpp
+++ b/src/gpu/text/GrGlyphCache.cpp
@@ -12,9 +12,14 @@
#include "SkAutoMalloc.h"
#include "SkDistanceFieldGen.h"
-GrGlyphCache::GrGlyphCache()
+GrGlyphCache::GrGlyphCache(const GrCaps* caps, float maxTextureBytes)
: fPreserveStrike(nullptr)
, fGlyphSizeLimit(0) {
+
+ int maxDim, minDim, maxPlot, minPlot;
+ GrRestrictedAtlasManager::ComputeAtlasLimits(caps, maxTextureBytes,
+ &maxDim, &minDim, &maxPlot, &minPlot);
+ fGlyphSizeLimit = minPlot;
}
GrGlyphCache::~GrGlyphCache() {