@@ -300,20 +300,20 @@ std::unique_ptr<TextAtlas> TextAtlas::Make(const TextGlyphs* textGlyphs, RenderC
300
300
float scale) {
301
301
auto context = renderCache->getContext ();
302
302
auto maxTextureSize = context->caps ()->maxTextureSize ;
303
- scale = scale * textGlyphs->maxScale ();
303
+ auto maxScale = scale * textGlyphs->maxScale ();
304
304
const auto & maskGlyphs = textGlyphs->maskAtlasGlyphs ();
305
- if (maskGlyphs.empty () || maskGlyphs[0 ]->getFont ().getSize () * scale > kMaxAtlasFontSize ) {
305
+ if (maskGlyphs.empty () || maskGlyphs[0 ]->getFont ().getSize () * maxScale > kMaxAtlasFontSize ) {
306
306
return nullptr ;
307
307
}
308
308
const auto & colorGlyphs = textGlyphs->colorAtlasGlyphs ();
309
- if (!colorGlyphs.empty () && colorGlyphs[0 ]->getFont ().getSize () * scale > kMaxAtlasFontSize ) {
309
+ if (!colorGlyphs.empty () && colorGlyphs[0 ]->getFont ().getSize () * maxScale > kMaxAtlasFontSize ) {
310
310
return nullptr ;
311
311
}
312
- auto maskAtlas = Atlas::Make (context, scale , maskGlyphs, maxTextureSize).release ();
312
+ auto maskAtlas = Atlas::Make (context, maxScale , maskGlyphs, maxTextureSize).release ();
313
313
if (maskAtlas == nullptr ) {
314
314
return nullptr ;
315
315
}
316
- auto colorAtlas = Atlas::Make (context, scale , colorGlyphs, maxTextureSize, false ).release ();
316
+ auto colorAtlas = Atlas::Make (context, maxScale , colorGlyphs, maxTextureSize, false ).release ();
317
317
return std::unique_ptr<TextAtlas>(new TextAtlas (textGlyphs->id (), maskAtlas, colorAtlas, scale));
318
318
}
319
319
0 commit comments