Browse Source

remove window global

master
Odilitime 5 years ago
parent
commit
37466ecb74
  1. 4
      src/graphics/text/TextRasterizerCache.cpp

4
src/graphics/text/TextRasterizerCache.cpp

@ -3,8 +3,6 @@ @@ -3,8 +3,6 @@
TextRasterizerCache *rasterizerCache=new TextRasterizerCache;
extern const std::unique_ptr<Window> window;
// reduces this:
// Updated DOM in: 6.787870 seconds
// to this:
@ -14,7 +12,6 @@ std::shared_ptr<TextRasterizer> TextRasterizerCache::loadFont(const unsigned int @@ -14,7 +12,6 @@ std::shared_ptr<TextRasterizer> TextRasterizerCache::loadFont(const unsigned int
if (fontSizes_bold.find(size) == fontSizes_bold.end()) {
//std::cout << "Making bold font" << std::endl;
fontSizes_bold[size]=std::make_shared<TextRasterizer>("DejaVuSerif.ttf", size, 72, bold);
fontSizes_bold[size]->win = window.get();
}
return fontSizes_bold[size];
}
@ -22,7 +19,6 @@ std::shared_ptr<TextRasterizer> TextRasterizerCache::loadFont(const unsigned int @@ -22,7 +19,6 @@ std::shared_ptr<TextRasterizer> TextRasterizerCache::loadFont(const unsigned int
if (fontSizes_notbold.find(size) == fontSizes_notbold.end()) {
//std::cout << "Making font" << std::endl;
fontSizes_notbold[size]=std::make_shared<TextRasterizer>("DejaVuSerif.ttf", size, 72, bold);
fontSizes_notbold[size]->win = window.get();
}
return fontSizes_notbold[size];
}

Loading…
Cancel
Save