Permalink
Browse files

Deprecate FRAME_BUFFER_HA2 parameter #977

  • Loading branch information...
devemux86 committed Jan 10, 2018
1 parent 0087a94 commit b13890eb2036e90906482cca5a85954c27d5fd04
@@ -1,5 +1,5 @@
/*
* Copyright 2017 devemux86
* Copyright 2017-2018 devemux86
*
* This program is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
@@ -16,11 +16,6 @@
public final class Parameters {
/**
* If true the <code>FrameBufferHA2</code> will be used instead of default <code>FrameBufferHA</code>.
*/
public static boolean FRAME_BUFFER_HA2 = true;
/**
* Maximum buffer size for map files.
*/
@@ -1,7 +1,7 @@
/*
* Copyright 2010, 2011, 2012, 2013 mapsforge.org
* Copyright 2014 Ludwig M Brinckmann
* Copyright 2014-2017 devemux86
* Copyright 2014-2018 devemux86
* Copyright 2015 Andreas Schildbach
*
* This program is free software: you can redistribute it and/or modify it under the
@@ -34,7 +34,6 @@
import org.mapsforge.core.model.Dimension;
import org.mapsforge.core.model.LatLong;
import org.mapsforge.core.model.Point;
import org.mapsforge.core.util.Parameters;
import org.mapsforge.map.android.graphics.AndroidGraphicFactory;
import org.mapsforge.map.android.input.MapZoomControls;
import org.mapsforge.map.android.input.TouchGestureHandler;
@@ -54,7 +53,6 @@
import org.mapsforge.map.util.MapViewProjection;
import org.mapsforge.map.view.FpsCounter;
import org.mapsforge.map.view.FrameBuffer;
import org.mapsforge.map.view.FrameBufferHA;
import org.mapsforge.map.view.FrameBufferHA2;
public class MapView extends ViewGroup implements org.mapsforge.map.view.MapView, Observer {
@@ -134,10 +132,7 @@ public MapView(Context context, AttributeSet attributeSet) {
this.model = new Model();
this.fpsCounter = new FpsCounter(GRAPHIC_FACTORY, this.model.displayModel);
if (Parameters.FRAME_BUFFER_HA2)
this.frameBuffer = new FrameBufferHA2(this.model.frameBufferModel, this.model.displayModel, GRAPHIC_FACTORY);
else
this.frameBuffer = new FrameBufferHA(this.model.frameBufferModel, this.model.displayModel, GRAPHIC_FACTORY);
this.frameBuffer = new FrameBufferHA2(this.model.frameBufferModel, this.model.displayModel, GRAPHIC_FACTORY);
this.frameBufferController = FrameBufferController.create(this.frameBuffer, this.model);
this.layerManager = new LayerManager(this, this.model.mapViewPosition, GRAPHIC_FACTORY);
@@ -1,7 +1,7 @@
/*
* Copyright 2010, 2011, 2012, 2013 mapsforge.org
* Copyright 2014 Ludwig M Brinckmann
* Copyright 2014-2017 devemux86
* Copyright 2014-2018 devemux86
*
* This program is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
@@ -21,7 +21,6 @@
import org.mapsforge.core.model.BoundingBox;
import org.mapsforge.core.model.Dimension;
import org.mapsforge.core.model.LatLong;
import org.mapsforge.core.util.Parameters;
import org.mapsforge.map.awt.graphics.AwtGraphicFactory;
import org.mapsforge.map.awt.input.MapViewComponentListener;
import org.mapsforge.map.awt.input.MouseEventListener;
@@ -40,7 +39,6 @@
import org.mapsforge.map.util.MapViewProjection;
import org.mapsforge.map.view.FpsCounter;
import org.mapsforge.map.view.FrameBuffer;
import org.mapsforge.map.view.FrameBufferHA;
import org.mapsforge.map.view.FrameBufferHA2;
import java.awt.Container;
@@ -65,10 +63,7 @@ public MapView() {
this.model = new Model();
this.fpsCounter = new FpsCounter(GRAPHIC_FACTORY, this.model.displayModel);
if (Parameters.FRAME_BUFFER_HA2)
this.frameBuffer = new FrameBufferHA2(this.model.frameBufferModel, this.model.displayModel, GRAPHIC_FACTORY);
else
this.frameBuffer = new FrameBufferHA(this.model.frameBufferModel, this.model.displayModel, GRAPHIC_FACTORY);
this.frameBuffer = new FrameBufferHA2(this.model.frameBufferModel, this.model.displayModel, GRAPHIC_FACTORY);
this.frameBufferController = FrameBufferController.create(this.frameBuffer, this.model);
this.layerManager = new LayerManager(this, this.model.mapViewPosition, GRAPHIC_FACTORY);
@@ -1,6 +1,6 @@
/*
* Copyright 2014-2015 Ludwig M Brinckmann
* Copyright 2015-2017 devemux86
* Copyright 2015-2018 devemux86
* Copyright 2015 Andreas Schildbach
* Copyright 2017 usrusr
*
@@ -104,9 +104,6 @@ protected void createControls() {
@Override
protected void createMapViews() {
// Frame buffer HA2
Parameters.FRAME_BUFFER_HA2 = true;
super.createMapViews();
mapView.getMapZoomControls().setZoomControlsOrientation(Orientation.VERTICAL_IN_OUT);
@@ -2,7 +2,7 @@
* Copyright 2010, 2011, 2012, 2013 mapsforge.org
* Copyright 2014 Christian Pesch
* Copyright 2014 Ludwig M Brinckmann
* Copyright 2014-2017 devemux86
* Copyright 2014-2018 devemux86
* Copyright 2017 usrusr
*
* This program is free software: you can redistribute it and/or modify it under the
@@ -77,9 +77,6 @@
* with possible SRTM hgt folder as 1st argument.
*/
public static void main(String[] args) {
// Frame buffer HA2
Parameters.FRAME_BUFFER_HA2 = true;
// Multithreaded map rendering
Parameters.NUMBER_OF_THREADS = 2;

0 comments on commit b13890e

Please sign in to comment.