diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2013-12-18 19:30:20 +0100 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2013-12-18 19:30:20 +0100 |
| commit | cf77b87b439e016999afc181fca133d68313867d (patch) | |
| tree | e340355fa8da99a5ff3922fb3b176c0cde71931d /main/src/cgeo/geocaching/maps/interfaces/MapViewImpl.java | |
| parent | e20a20f09474ad7187dccdd54ce044c91d165196 (diff) | |
| download | cgeo-cf77b87b439e016999afc181fca133d68313867d.zip cgeo-cf77b87b439e016999afc181fca133d68313867d.tar.gz cgeo-cf77b87b439e016999afc181fca133d68313867d.tar.bz2 | |
refactoring: reduce mapsforge memory usage
This puts scale and position into one overlay, instead of using 2
overlays. That reduces memory usage by 2 times a full screen bitmap due
to double buffering in mapsforge.
The only downside is that scale and position now have to be drawn at the
same depth-level (below or on top of the caches), but they were both on
top previously anyway.
Diffstat (limited to 'main/src/cgeo/geocaching/maps/interfaces/MapViewImpl.java')
| -rw-r--r-- | main/src/cgeo/geocaching/maps/interfaces/MapViewImpl.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/main/src/cgeo/geocaching/maps/interfaces/MapViewImpl.java b/main/src/cgeo/geocaching/maps/interfaces/MapViewImpl.java index 5481891..cb7ddc6 100644 --- a/main/src/cgeo/geocaching/maps/interfaces/MapViewImpl.java +++ b/main/src/cgeo/geocaching/maps/interfaces/MapViewImpl.java @@ -2,8 +2,7 @@ package cgeo.geocaching.maps.interfaces; import cgeo.geocaching.geopoint.Viewport; import cgeo.geocaching.maps.CachesOverlay; -import cgeo.geocaching.maps.PositionOverlay; -import cgeo.geocaching.maps.ScaleOverlay; +import cgeo.geocaching.maps.PositionAndScaleOverlay; import android.app.Activity; import android.content.Context; @@ -47,9 +46,7 @@ public interface MapViewImpl { CachesOverlay createAddMapOverlay(Context context, Drawable drawable); - ScaleOverlay createAddScaleOverlay(Activity activity); - - PositionOverlay createAddPositionOverlay(Activity activity); + PositionAndScaleOverlay createAddPositionAndScaleOverlay(Activity activity); void setMapSource(); |
