[core] cache binary shaders on Android

This commit is contained in:
Konstantin Käfer
2017-03-15 18:43:58 +01:00
parent d20327844c
commit 3c91b6b7de
29 changed files with 541 additions and 47 deletions

View File

@@ -97,7 +97,8 @@ final class NativeMapView {
onMapChangedListeners = new CopyOnWriteArrayList<>();
this.mapView = mapView;
nativeInitialize(this, fileSource, pixelRatio, availableProcessors, totalMemory);
String programCacheDir = context.getCacheDir().getAbsolutePath();
nativeInitialize(this, fileSource, pixelRatio, programCacheDir, availableProcessors, totalMemory);
}
//
@@ -961,8 +962,12 @@ final class NativeMapView {
// JNI methods
//
private native void nativeInitialize(NativeMapView nativeMapView, FileSource fileSource,
float pixelRatio, int availableProcessors, long totalMemory);
private native void nativeInitialize(NativeMapView nativeMapView,
FileSource fileSource,
float pixelRatio,
String programCacheDir,
int availableProcessors,
long totalMemory);
private native void nativeDestroy();