summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnsis Brammanis <brammanis@gmail.com>2015-02-02 18:27:55 -0800
committerAnsis Brammanis <brammanis@gmail.com>2015-02-02 18:27:55 -0800
commitc9f8de863dc93e4fd587290357c8a3b572a4f956 (patch)
tree64941ed48b691e27bbbfe3caa487bf36882443e0 /src
parent6f5c6b58b48e762ed7aced6c4486f1060d0e34f1 (diff)
downloadqtlocation-mapboxgl-c9f8de863dc93e4fd587290357c8a3b572a4f956.tar.gz
remove old version of zoomHistory
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/renderer/painter.cpp25
-rw-r--r--src/mbgl/renderer/painter.hpp5
2 files changed, 1 insertions, 29 deletions
diff --git a/src/mbgl/renderer/painter.cpp b/src/mbgl/renderer/painter.cpp
index 84bd24c5e7..02e263a1ca 100644
--- a/src/mbgl/renderer/painter.cpp
+++ b/src/mbgl/renderer/painter.cpp
@@ -232,7 +232,7 @@ void Painter::render(const Style& style, const std::set<util::ptr<StyleSource>>&
drawClippingMasks(sources);
- recordZoom(time, state.getNormalizedZoom());
+ frameHistory.record(time, state.getNormalizedZoom());
// Actually render the layers
if (debug::renderTree) { std::cout << "{" << std::endl; indent++; }
@@ -479,26 +479,3 @@ mat4 Painter::translatedMatrix(const mat4& matrix, const std::array<float, 2> &t
return vtxMatrix;
}
}
-
-void Painter::recordZoom(const timestamp time, const float zoom) {
- frameHistory.record(time, zoom);
-
- if (lastZoom < 0) {
- // first frame ever
- lastIntegerZoom = std::floor(zoom);
- lastZoom = zoom;
- }
-
- // check whether an integer zoom level was passed since the last frame
- // and if yes, record it with the time. Used for transitioning patterns.
- if (std::floor(lastZoom) < std::floor(zoom)) {
- lastIntegerZoom = std::floor(zoom);
- lastIntegerZoomTime = time;
-
- } else if (std::floor(lastZoom) > std::floor(zoom)) {
- lastIntegerZoom = std::floor(zoom) + 1;
- lastIntegerZoomTime = time;
- }
-
- lastZoom = zoom;
-}
diff --git a/src/mbgl/renderer/painter.hpp b/src/mbgl/renderer/painter.hpp
index 5a42070200..4d4876a6f1 100644
--- a/src/mbgl/renderer/painter.hpp
+++ b/src/mbgl/renderer/painter.hpp
@@ -139,7 +139,6 @@ private:
mat4 translatedMatrix(const mat4& matrix, const std::array<float, 2> &translation, const Tile::ID &id, TranslateAnchorType anchor);
void prepareTile(const Tile& tile);
- void recordZoom(const timestamp time, const float zoom);
template <typename BucketProperties, typename StyleProperties>
void renderSDF(SymbolBucket &bucket,
@@ -192,10 +191,6 @@ private:
RenderPass pass = RenderPass::Opaque;
const float strata_epsilon = 1.0f / (1 << 16);
- int lastIntegerZoom;
- timestamp lastIntegerZoomTime = 0;
- float lastZoom = -1;
-
public:
FrameHistory frameHistory;