Special case for SDK 8 and using direct rendering
This commit is contained in:
parent
456d032b7c
commit
762171bab2
2 changed files with 6 additions and 2 deletions
|
@ -68,6 +68,10 @@ public class NativeOsmandLibrary {
|
|||
}
|
||||
return isSupported();
|
||||
}
|
||||
|
||||
public boolean useDirectRendering(){
|
||||
return android.os.Build.VERSION.SDK_INT >= 8;
|
||||
}
|
||||
|
||||
public RenderingGenerationResult generateRendering(RenderingContext rc, NativeSearchResult searchResultHandler,
|
||||
Bitmap bitmap, int requestedBitmapWidth, int requestedBitmapHeight, int rowBytes, boolean isTransparent,
|
||||
|
|
|
@ -210,7 +210,7 @@ public class OsmandRenderer {
|
|||
rc.sinRotateTileSize = FloatMath.sin((float) Math.toRadians(rc.rotate)) * TILE_SIZE;
|
||||
rc.density = dm.density;
|
||||
try {
|
||||
if(Looper.getMainLooper() != null){
|
||||
if(Looper.getMainLooper() != null && library.useDirectRendering()) {
|
||||
final Handler h = new Handler(Looper.getMainLooper());
|
||||
notifyListenersWithDelay(rc, notifyList, h);
|
||||
}
|
||||
|
@ -335,7 +335,7 @@ public class OsmandRenderer {
|
|||
notifyListenersWithDelay(rc, notifyList, h);
|
||||
}
|
||||
}
|
||||
}, 700);
|
||||
}, 800);
|
||||
}
|
||||
|
||||
private void drawIconsOverCanvas(RenderingContext rc, Canvas cv) {
|
||||
|
|
Loading…
Reference in a new issue