[core] Get FileSource via UpdateParameters in Renderer::Impl

This commit is contained in:
Bruno de Oliveira Abinader
2019-03-13 16:24:27 +02:00
parent 1b39f456fd
commit 8cc100bfd5
36 changed files with 46 additions and 66 deletions

View File

@@ -37,14 +37,12 @@ static RendererObserver& nullObserver() {
Renderer::Impl::Impl(RendererBackend& backend_,
float pixelRatio_,
FileSource& fileSource_,
Scheduler& scheduler_,
GLContextMode contextMode_,
const optional<std::string> programCacheDir_,
const optional<std::string> localFontFamily_)
: backend(backend_)
, scheduler(scheduler_)
, fileSource(fileSource_)
, observer(&nullObserver())
, contextMode(contextMode_)
, pixelRatio(pixelRatio_)
@@ -78,7 +76,7 @@ void Renderer::Impl::setObserver(RendererObserver* observer_) {
void Renderer::Impl::render(const UpdateParameters& updateParameters) {
if (!glyphManager) {
glyphManager = std::make_unique<GlyphManager>(fileSource, std::make_unique<LocalGlyphRasterizer>(localFontFamily));
glyphManager = std::make_unique<GlyphManager>(updateParameters.fileSource, std::make_unique<LocalGlyphRasterizer>(localFontFamily));
glyphManager->setObserver(this);
}
@@ -118,7 +116,7 @@ void Renderer::Impl::render(const UpdateParameters& updateParameters) {
updateParameters.debugOptions,
updateParameters.transformState,
scheduler,
fileSource,
updateParameters.fileSource,
updateParameters.mode,
updateParameters.annotationManager,
*imageManager,