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

@@ -1285,8 +1285,7 @@ public class MapView extends SurfaceView {
post(new Runnable() {
@Override
public void run() {
boolean inProgress = mRotateGestureDetector.isInProgress() || mScaleGestureDetector.isInProgress();
mNativeMapView.invalidate(inProgress);
mNativeMapView.invalidate();
}
});
}

View File

@@ -96,8 +96,8 @@ class NativeMapView {
nativeUpdate(mNativeMapViewPtr);
}
public void invalidate(boolean inProgress) {
nativeOnInvalidate(mNativeMapViewPtr, inProgress);
public void invalidate() {
nativeOnInvalidate(mNativeMapViewPtr);
}
public void resizeView(int width, int height) {
@@ -463,7 +463,7 @@ class NativeMapView {
private native void nativeUpdate(long nativeMapViewPtr);
private native void nativeOnInvalidate(long nativeMapViewPtr, boolean inProgress);
private native void nativeOnInvalidate(long nativeMapViewPtr);
private native void nativeViewResize(long nativeMapViewPtr, int width, int height);