summaryrefslogtreecommitdiff
path: root/src/mbgl/map
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-01-15 11:39:12 +0100
committerKonstantin Käfer <mail@kkaefer.com>2016-01-15 12:48:24 +0100
commit01f31a82a8be87b25ea3b466a9248e2344fb52ff (patch)
treef10ad1856c5dd7b91973633254a46f3d1038ea89 /src/mbgl/map
parent3f5d02ee6509e2fe0abb9bb9aa34979a3bad932c (diff)
downloadqtlocation-mapboxgl-01f31a82a8be87b25ea3b466a9248e2344fb52ff.tar.gz
[core] update the modified/expires debug info for unmodified responses as well
Diffstat (limited to 'src/mbgl/map')
-rw-r--r--src/mbgl/map/raster_tile_data.cpp6
-rw-r--r--src/mbgl/map/vector_tile_data.cpp6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/mbgl/map/raster_tile_data.cpp b/src/mbgl/map/raster_tile_data.cpp
index 19baa26e55..da2dd808bd 100644
--- a/src/mbgl/map/raster_tile_data.cpp
+++ b/src/mbgl/map/raster_tile_data.cpp
@@ -40,6 +40,9 @@ void RasterTileData::request(const std::string& url,
return;
}
+ modified = res.modified;
+ expires = res.expires;
+
if (res.notModified) {
// We got the same data again. Abort early.
return;
@@ -50,9 +53,6 @@ void RasterTileData::request(const std::string& url,
state = State::loaded;
}
- modified = res.modified;
- expires = res.expires;
-
workRequest.reset();
workRequest = worker.parseRasterTile(std::make_unique<RasterBucket>(texturePool), res.data, [this, callback] (RasterTileParseResult result) {
workRequest.reset();
diff --git a/src/mbgl/map/vector_tile_data.cpp b/src/mbgl/map/vector_tile_data.cpp
index ee43373a69..4bf686b732 100644
--- a/src/mbgl/map/vector_tile_data.cpp
+++ b/src/mbgl/map/vector_tile_data.cpp
@@ -41,6 +41,9 @@ VectorTileData::VectorTileData(const TileID& id_,
// messages from being displayed again, e.g. after a connection trouble cleared up.
error = nullptr;
+ modified = modified_;
+ expires = expires_;
+
if (!tile) {
// This is a 404 response. We're treating these as empty tiles.
state = State::parsed;
@@ -55,9 +58,6 @@ VectorTileData::VectorTileData(const TileID& id_,
state = State::partial;
}
- modified = modified_;
- expires = expires_;
-
// Kick off a fresh parse of this tile. This happens when the tile is new, or
// when tile data changed. Replacing the workdRequest will cancel a pending work
// request in case there is one.