summaryrefslogtreecommitdiff
path: root/src/mbgl/style
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-12-14 16:33:55 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-12-14 17:01:16 -0800
commit4a803f1a78d6d9adc603129c369cb75592c408b7 (patch)
tree190cba5a37bbe81bda97e9c5b67617e507d11b5d /src/mbgl/style
parent95cef66e229f3ae346a66ea87f95a8a660c3108f (diff)
downloadqtlocation-mapboxgl-4a803f1a78d6d9adc603129c369cb75592c408b7.tar.gz
[core] Don't use glClear optimization for layers that aren't the bottommost
Fixes #3292
Diffstat (limited to 'src/mbgl/style')
-rw-r--r--src/mbgl/style/style.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/style/style.cpp b/src/mbgl/style/style.cpp
index a328b890d8..d82689f220 100644
--- a/src/mbgl/style/style.cpp
+++ b/src/mbgl/style/style.cpp
@@ -236,7 +236,7 @@ RenderData Style::getRenderData() const {
continue;
if (const BackgroundLayer* background = layer->as<BackgroundLayer>()) {
- if (background->paint.pattern.value.from.empty()) {
+ if (layer.get() == layers[0].get() && background->paint.pattern.value.from.empty()) {
// This is a solid background. We can use glClear().
result.backgroundColor = background->paint.color;
result.backgroundColor[0] *= background->paint.opacity;
@@ -244,7 +244,7 @@ RenderData Style::getRenderData() const {
result.backgroundColor[2] *= background->paint.opacity;
result.backgroundColor[3] *= background->paint.opacity;
} else {
- // This is a textured background. We need to render it with a quad.
+ // This is a textured background, or not the bottommost layer. We need to render it with a quad.
result.order.emplace_back(*layer);
}
continue;