Changeset 12551 in josm for trunk/test/performance
- Timestamp:
- 2017-08-01T13:23:02+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/performance/org/openstreetmap/josm/data/osm/visitor/paint/AbstractMapRendererPerformanceTestParent.java
r10907 r12551 5 5 import java.awt.Graphics2D; 6 6 import java.awt.image.BufferedImage; 7 import java.awt.Point; 7 8 import java.io.File; 8 9 import java.io.FileInputStream; … … 16 17 import org.junit.rules.Timeout; 17 18 import org.openstreetmap.josm.JOSMFixture; 18 import org.openstreetmap.josm.Main;19 19 import org.openstreetmap.josm.data.Bounds; 20 20 import org.openstreetmap.josm.data.osm.DataSet; … … 55 55 img = new BufferedImage(IMG_WIDTH, IMG_HEIGHT, BufferedImage.TYPE_INT_ARGB); 56 56 g = (Graphics2D) img.getGraphics(); 57 g.setClip(0, 0, IMG_WIDTH, IMG_ WIDTH);57 g.setClip(0, 0, IMG_WIDTH, IMG_HEIGHT); 58 58 g.setColor(Color.BLACK); 59 g.fillRect(0, 0, IMG_WIDTH, IMG_WIDTH); 60 nc = Main.map.mapView; 61 nc.setBounds(0, 0, IMG_WIDTH, IMG_HEIGHT); 59 g.fillRect(0, 0, IMG_WIDTH, IMG_HEIGHT); 60 nc = new NavigatableComponent() { 61 { 62 setBounds(0, 0, IMG_WIDTH, IMG_HEIGHT); 63 updateLocationState(); 64 } 65 66 @Override 67 protected boolean isVisibleOnScreen() { 68 return true; 69 } 70 71 @Override 72 public Point getLocationOnScreen() { 73 return new Point(0, 0); 74 } 75 }; 76 77 // Force reset of preferences 78 StyledMapRenderer.PREFERENCE_ANTIALIASING_USE.put(true); 79 StyledMapRenderer.PREFERENCE_TEXT_ANTIALIASING.put("gasp"); 62 80 63 81 try ( … … 84 102 85 103 protected final void test(int iterations, DataSet ds, Bounds bounds) throws Exception { 104 nc.zoomTo(bounds); 86 105 Rendering visitor = buildRenderer(); 87 nc.zoomTo(bounds);88 106 for (int i = 0; i < iterations; i++) { 89 107 visitor.render(ds, true, bounds);
Note:
See TracChangeset
for help on using the changeset viewer.