[core] Immutable Impls
This commit is contained in:
@@ -6,7 +6,7 @@ namespace mbgl {
|
||||
|
||||
static RenderSourceObserver nullObserver;
|
||||
|
||||
RenderSource::RenderSource(const style::Source::Impl& impl)
|
||||
RenderSource::RenderSource(Immutable<style::Source::Impl> impl)
|
||||
: baseImpl(impl),
|
||||
observer(&nullObserver) {
|
||||
}
|
||||
@@ -15,6 +15,10 @@ void RenderSource::setObserver(RenderSourceObserver* observer_) {
|
||||
observer = observer_;
|
||||
}
|
||||
|
||||
void RenderSource::setImpl(Immutable<style::Source::Impl> impl) {
|
||||
baseImpl = impl;
|
||||
}
|
||||
|
||||
void RenderSource::onTileChanged(Tile& tile) {
|
||||
observer->onTileChanged(*this, tile.id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user