summaryrefslogtreecommitdiff
path: root/src/mbgl/style/style.cpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-06-15 13:22:00 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-06-15 13:22:00 -0700
commita020e535cac36d69a8939fb7956260d2217c65b4 (patch)
tree7acef00fd8aa1e85dae8ff5491e40f42659b5fd6 /src/mbgl/style/style.cpp
parentd48333f26d9111d8f4f8420b477c36cece0d14a5 (diff)
downloadqtlocation-mapboxgl-a020e535cac36d69a8939fb7956260d2217c65b4.tar.gz
[core] Add a few conveniences to Color
Diffstat (limited to 'src/mbgl/style/style.cpp')
-rw-r--r--src/mbgl/style/style.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/mbgl/style/style.cpp b/src/mbgl/style/style.cpp
index 44192fc985..af19c41393 100644
--- a/src/mbgl/style/style.cpp
+++ b/src/mbgl/style/style.cpp
@@ -266,11 +266,7 @@ RenderData Style::getRenderData() const {
const BackgroundPaintProperties& paint = background->impl->paint;
if (layer.get() == layers[0].get() && paint.backgroundPattern.value.from.empty()) {
// This is a solid background. We can use glClear().
- result.backgroundColor = paint.backgroundColor;
- result.backgroundColor.r *= paint.backgroundOpacity;
- result.backgroundColor.g *= paint.backgroundOpacity;
- result.backgroundColor.b *= paint.backgroundOpacity;
- result.backgroundColor.a *= paint.backgroundOpacity;
+ result.backgroundColor = paint.backgroundColor * paint.backgroundOpacity;
} else {
// This is a textured background, or not the bottommost layer. We need to render it with a quad.
result.order.emplace_back(*layer);