aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/text/GrAtlasGlyphCache.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/text/GrAtlasGlyphCache.h')
-rw-r--r--src/gpu/text/GrAtlasGlyphCache.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/gpu/text/GrAtlasGlyphCache.h b/src/gpu/text/GrAtlasGlyphCache.h
index 6c5ce767db..aa337c43f5 100644
--- a/src/gpu/text/GrAtlasGlyphCache.h
+++ b/src/gpu/text/GrAtlasGlyphCache.h
@@ -130,20 +130,17 @@ public:
// if getProxies returns nullptr, the client must not try to use other functions on the
// GrAtlasGlyphCache which use the atlas. This function *must* be called first, before other
// functions which use the atlas.
- const sk_sp<GrTextureProxy>* getProxies(GrMaskFormat format) {
+ const sk_sp<GrTextureProxy>* getProxies(GrMaskFormat format, unsigned int* numProxies) {
+ SkASSERT(numProxies);
+
if (this->initAtlas(format)) {
+ *numProxies = this->getAtlas(format)->pageCount();
return this->getAtlas(format)->getProxies();
}
+ *numProxies = 0;
return nullptr;
}
- uint32_t getAtlasPageCount(GrMaskFormat format) {
- if (this->initAtlas(format)) {
- return this->getAtlas(format)->pageCount();
- }
- return 0;
- }
-
SkScalar getGlyphSizeLimit() const { return fGlyphSizeLimit; }
bool hasGlyph(GrGlyph* glyph) {