[core] separate Backend from View for headless rendering
This commit is contained in:
@@ -813,7 +813,7 @@ QMapboxGLPrivate::QMapboxGLPrivate(QMapboxGL *q, const QMapboxGLSettings &settin
|
||||
settings.cacheDatabaseMaximumSize()))
|
||||
, threadPool(4)
|
||||
, mapObj(std::make_unique<mbgl::Map>(
|
||||
*this, *fileSourceObj, threadPool,
|
||||
*this, *this, getPixelRatio(), *fileSourceObj, threadPool,
|
||||
static_cast<mbgl::MapMode>(settings.mapMode()),
|
||||
static_cast<mbgl::GLContextMode>(settings.contextMode()),
|
||||
static_cast<mbgl::ConstrainMode>(settings.constrainMode()),
|
||||
@@ -845,6 +845,11 @@ float QMapboxGLPrivate::getPixelRatio() const
|
||||
return pixelRatio;
|
||||
}
|
||||
|
||||
void QMapboxGLPrivate::bind()
|
||||
{
|
||||
MBGL_CHECK_ERROR(glBindFramebuffer(GL_FRAMEBUFFER, 0));
|
||||
}
|
||||
|
||||
std::array<uint16_t, 2> QMapboxGLPrivate::getSize() const
|
||||
{
|
||||
return {{ static_cast<uint16_t>(size.width()), static_cast<uint16_t>(size.height()) }};
|
||||
|
||||
Reference in New Issue
Block a user