Map::nudgeTransitions no longer depends on client information

Clients no longer need to provide data (eg. if gesturing or in a custom
animation) to Map::nudgeTransitions().

Upon MapContext::renderSync(), a new atomic bool 'needsRepaint' in MapData
allows thread-safe communication between Map and MapContext.
This commit is contained in:
Bruno de Oliveira Abinader
2015-08-03 01:36:19 +03:00
parent 9fd7e883a7
commit fa4636ffe4
12 changed files with 48 additions and 52 deletions

View File

@@ -49,7 +49,7 @@ public:
void enableFps(bool enable);
void updateFps();
void onInvalidate(bool inProgress);
void onInvalidate();
void resizeView(int width, int height);
void resizeFramebuffer(int width, int height);

View File

@@ -66,11 +66,11 @@ public:
using StillImageCallback = std::function<void(std::exception_ptr, std::unique_ptr<const StillImage>)>;
void renderStill(StillImageCallback callback);
// Triggers a synchronous or asynchronous render.
bool renderSync();
// Triggers a synchronous render.
void renderSync();
// Nudges transitions one step, possibly notifying of the need for a rerender.
void nudgeTransitions(bool forceRerender);
// Nudges transitions one step, possibly notifying of the need for a rerender, if any.
void nudgeTransitions();
// Notifies the Map thread that the state has changed and an update might be necessary.
void update(Update update);