summaryrefslogtreecommitdiff
path: root/src/mbgl/style/source_impl.cpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-08-29 12:52:49 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-09-06 12:52:14 -0700
commit3635b9f1476ffd5d8f38a7abdf5742faef012850 (patch)
treee1ec24db4a0b90e7eb0c23768312183d1a2a526d /src/mbgl/style/source_impl.cpp
parent5b4f6335e384169bcd88633e38d59a500319a47b (diff)
downloadqtlocation-mapboxgl-3635b9f1476ffd5d8f38a7abdf5742faef012850.tar.gz
[core] Prepare style observer interfaces for source reloading
* Renamed {Source,Tile}Observer::onNeedsRepaint to onTileUpdated. Messages should be in terms of what happened to the observed object, not in terms of what the observer needs to do. This also removes a confusing overlap of virtual methods on StyleObserver. * Added style::Observer::onUpdate(Update). This is also a violation of the above rule, but I'm hopeful that it will disappear when update batching is implemented.
Diffstat (limited to 'src/mbgl/style/source_impl.cpp')
-rw-r--r--src/mbgl/style/source_impl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/style/source_impl.cpp b/src/mbgl/style/source_impl.cpp
index d5e33caa55..45cc27ef1f 100644
--- a/src/mbgl/style/source_impl.cpp
+++ b/src/mbgl/style/source_impl.cpp
@@ -266,8 +266,8 @@ void Source::Impl::onTileError(Tile& tile, std::exception_ptr error) {
observer->onTileError(base, tile.id, error);
}
-void Source::Impl::onNeedsRepaint() {
- observer->onNeedsRepaint();
+void Source::Impl::onTileUpdated(Tile& tile) {
+ observer->onTileUpdated(base, tile.id);
}
void Source::Impl::dumpDebugLogs() const {