Changeset 7109 in josm for trunk/test/performance/org


Ignore:
Timestamp:
2014-05-12T00:40:09+02:00 (10 years ago)
Author:
Don-vip
Message:

see #8671 - some code refactoring done in an unsuccessful attempt to reproduce error, but worth keeping

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  
    44import java.awt.Graphics2D;
    55import java.awt.image.BufferedImage;
     6import java.io.File;
    67import java.io.FileInputStream;
    78import java.io.InputStream;
    8 import java.io.File;
    99
    1010import org.junit.BeforeClass;
    1111import org.junit.Test;
    12 import org.openstreetmap.josm.Main;
     12import org.openstreetmap.josm.JOSMFixture;
    1313import org.openstreetmap.josm.data.Bounds;
    1414import org.openstreetmap.josm.data.osm.DataSet;
    15 import org.openstreetmap.josm.data.projection.Projections;
    1615import org.openstreetmap.josm.gui.NavigatableComponent;
    1716import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
    1817import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
     18import org.openstreetmap.josm.io.Compression;
    1919import org.openstreetmap.josm.io.OsmReader;
    20 import org.openstreetmap.josm.io.Compression;
    2120
    2221public class StyledMapRendererPerformanceTest {
     
    3433    @BeforeClass
    3534    public static void load() throws Exception {
    36         Main.initApplicationPreferences();
    37         Main.setProjection(Projections.getProjectionByCode("EPSG:3857")); // Mercator
     35        JOSMFixture.createPerformanceTestFixture().init();
    3836        img = new BufferedImage(IMG_WIDTH, IMG_HEIGHT, BufferedImage.TYPE_3BYTE_BGR);
    3937        g = (Graphics2D)img.getGraphics();
     
    5351            dsCity = OsmReader.parseDataSet(fisC, NullProgressMonitor.INSTANCE);
    5452        }
    55 
    56         // Warm up
    57         new StyledMapRendererPerformanceTest().testRestrictionSmall();
    58         new StyledMapRendererPerformanceTest().testCity();
    5953    }
    6054
  • trunk/test/performance/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSPerformanceTest.groovy

    r7068 r7109  
    111111        def mv = Main.map.mapView
    112112
    113         BufferedImage img = mv.createImage(mv.getWidth(), mv.getHeight())
     113        BufferedImage img = new BufferedImage(mv.getWidth(), mv.getHeight(), BufferedImage.TYPE_3BYTE_BGR)
    114114        Graphics2D g = img.createGraphics()
    115115        g.setClip(0,0, mv.getWidth(), mv.getHeight())
Note: See TracChangeset for help on using the changeset viewer.