summaryrefslogtreecommitdiff
path: root/src/mbgl/renderer/painter_fill.cpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-10-10 17:16:37 +0200
committerKonstantin Käfer <mail@kkaefer.com>2016-10-25 13:52:36 -0700
commita4d259c33f9bb890bba97fd89552720e3e0ec09b (patch)
tree342ecc27a6993c48f3a2e1d739fce890350bc44d /src/mbgl/renderer/painter_fill.cpp
parent5cc390d694fc7510d445310d8eb9e32429a5e67b (diff)
downloadqtlocation-mapboxgl-a4d259c33f9bb890bba97fd89552720e3e0ec09b.tar.gz
[core] move gl::Context to Backend and refactor View
Diffstat (limited to 'src/mbgl/renderer/painter_fill.cpp')
-rw-r--r--src/mbgl/renderer/painter_fill.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mbgl/renderer/painter_fill.cpp b/src/mbgl/renderer/painter_fill.cpp
index 1fc5f11079..b6606ca40b 100644
--- a/src/mbgl/renderer/painter_fill.cpp
+++ b/src/mbgl/renderer/painter_fill.cpp
@@ -30,7 +30,9 @@ void Painter::renderFill(PaintParameters& parameters,
const bool isOutlineColorDefined = !properties.fillOutlineColor.isUndefined();
Color strokeColor = isOutlineColorDefined? properties.fillOutlineColor : fillColor;
- auto worldSize = util::convert<GLfloat>(parameters.view.getFramebufferSize());
+ const auto viewport = context.viewport.getCurrentValue();
+ const std::array<GLfloat, 2> worldSize{ { static_cast<GLfloat>(viewport.width),
+ static_cast<GLfloat>(viewport.height) } };
bool pattern = !properties.fillPattern.value.from.empty();
bool outline = properties.fillAntialias && !pattern && isOutlineColorDefined;