Changeset 7109 in josm for trunk/test/performance/org
- Timestamp:
- 2014-05-12T00:40:09+02:00 (10 years ago)
- Location:
- trunk/test/performance/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/performance/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRendererPerformanceTest.java
r7093 r7109 4 4 import java.awt.Graphics2D; 5 5 import java.awt.image.BufferedImage; 6 import java.io.File; 6 7 import java.io.FileInputStream; 7 8 import java.io.InputStream; 8 import java.io.File;9 9 10 10 import org.junit.BeforeClass; 11 11 import org.junit.Test; 12 import org.openstreetmap.josm. Main;12 import org.openstreetmap.josm.JOSMFixture; 13 13 import org.openstreetmap.josm.data.Bounds; 14 14 import org.openstreetmap.josm.data.osm.DataSet; 15 import org.openstreetmap.josm.data.projection.Projections;16 15 import org.openstreetmap.josm.gui.NavigatableComponent; 17 16 import org.openstreetmap.josm.gui.mappaint.MapPaintStyles; 18 17 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; 18 import org.openstreetmap.josm.io.Compression; 19 19 import org.openstreetmap.josm.io.OsmReader; 20 import org.openstreetmap.josm.io.Compression;21 20 22 21 public class StyledMapRendererPerformanceTest { … … 34 33 @BeforeClass 35 34 public static void load() throws Exception { 36 Main.initApplicationPreferences(); 37 Main.setProjection(Projections.getProjectionByCode("EPSG:3857")); // Mercator 35 JOSMFixture.createPerformanceTestFixture().init(); 38 36 img = new BufferedImage(IMG_WIDTH, IMG_HEIGHT, BufferedImage.TYPE_3BYTE_BGR); 39 37 g = (Graphics2D)img.getGraphics(); … … 53 51 dsCity = OsmReader.parseDataSet(fisC, NullProgressMonitor.INSTANCE); 54 52 } 55 56 // Warm up57 new StyledMapRendererPerformanceTest().testRestrictionSmall();58 new StyledMapRendererPerformanceTest().testCity();59 53 } 60 54 -
trunk/test/performance/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSPerformanceTest.groovy
r7068 r7109 111 111 def mv = Main.map.mapView 112 112 113 BufferedImage img = mv.createImage(mv.getWidth(), mv.getHeight())113 BufferedImage img = new BufferedImage(mv.getWidth(), mv.getHeight(), BufferedImage.TYPE_3BYTE_BGR) 114 114 Graphics2D g = img.createGraphics() 115 115 g.setClip(0,0, mv.getWidth(), mv.getHeight())
Note:
See TracChangeset
for help on using the changeset viewer.