[core] Merge RenderLayer::uploadBuckets into RenderSource::startRender
This commit is contained in:
@@ -27,10 +27,10 @@ bool RenderImageSource::isLoaded() const {
|
||||
}
|
||||
|
||||
void RenderImageSource::startRender(Painter& painter) {
|
||||
|
||||
if (!isLoaded()) {
|
||||
return;
|
||||
}
|
||||
|
||||
matrices.clear();
|
||||
|
||||
for (size_t i = 0; i < tileIds.size(); i++) {
|
||||
@@ -40,6 +40,10 @@ void RenderImageSource::startRender(Painter& painter) {
|
||||
matrix::multiply(matrix, painter.projMatrix, matrix);
|
||||
matrices.push_back(matrix);
|
||||
}
|
||||
|
||||
if (bucket->needsUpload() && shouldRender) {
|
||||
bucket->upload(painter.context);
|
||||
}
|
||||
}
|
||||
|
||||
void RenderImageSource::finishRender(Painter& painter) {
|
||||
@@ -63,12 +67,6 @@ std::vector<Feature> RenderImageSource::querySourceFeatures(const SourceQueryOpt
|
||||
return {};
|
||||
}
|
||||
|
||||
void RenderImageSource::upload(gl::Context& context) {
|
||||
if (isLoaded() && bucket->needsUpload() && shouldRender) {
|
||||
bucket->upload(context);
|
||||
}
|
||||
}
|
||||
|
||||
void RenderImageSource::update(Immutable<style::Source::Impl> baseImpl_,
|
||||
const std::vector<Immutable<Layer::Impl>>&,
|
||||
const bool needsRendering,
|
||||
|
||||
Reference in New Issue
Block a user