Changeset 3167 in josm


Ignore:
Timestamp:
2010-04-05T20:52:04+02:00 (15 years ago)
Author:
jttt
Message:

Added mappaint performance test

Location:
trunk
Files:
8 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/.classpath

    r2926 r3167  
    44        <classpathentry kind="src" path="test/unit"/>
    55        <classpathentry kind="src" path="test/functional"/>
    6         <classpathentry excluding="build/|dist/|src/|test/|test/build/|test/functional/|test/unit/" including="CONTRIBUTION|LICENSE|README|data/|images/|presets/|styles/" kind="src" path=""/>
     6        <classpathentry excluding="build/|data_nodist/|dist/|doc/|lib/|macosx/|src/|test/|test/build/|test/functional/|test/performance/|test/unit/|tools/|utils/" kind="src" path=""/>
     7        <classpathentry kind="src" path="test/performance"/>
    78        <classpathentry kind="lib" path="lib/metadata-extractor-2.3.1-nosun.jar"/>
    89        <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
     
    1718        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
    1819        <classpathentry exported="true" kind="con" path="GROOVY_SUPPORT"/>
    19         <classpathentry kind="lib" path="test/build"/>
    2020        <classpathentry kind="lib" path="lib/signpost-core-1.1.jar"/>
    2121        <classpathentry kind="output" path="bin"/>
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPaintVisitor.java

    r3102 r3167  
    1717import java.util.Comparator;
    1818import java.util.LinkedList;
    19 import java.util.List;
    2019
    2120import org.openstreetmap.josm.Main;
     
    645644        BBox bbox = new BBox(bounds);
    646645        this.data = data;
     646        ++paintid;
    647647
    648648        useStyleCache = Main.pref.getBoolean("mappaint.cache", true);
     
    653653
    654654        zoomLevelDisplay = Main.pref.getBoolean("mappaint.zoomLevelDisplay", false);
    655         circum = Main.map.mapView.getDist100Pixel();
     655        circum = nc.getDist100Pixel();
    656656        styles = MapPaintStyles.getStyles().getStyleSet();
    657657        drawMultipolygon = Main.pref.getBoolean("mappaint.multipolygon", true);
     
    670670        data.clearErrors();
    671671
    672         ++paintid;
    673672
    674673        if (fillAreas > dist && styles != null && styles.hasAreas()) {
    675674            Collection<Way> noAreaWays = new LinkedList<Way>();
    676675
    677             List<Relation> relations = data.searchRelations(bbox);
    678676            /*** RELATIONS ***/
    679677            for (final Relation osm: data.searchRelations(bbox)) {
     
    709707
    710708            /*** WAYS (filling disabled)  ***/
    711             for (final Way way: data.getWays()) {
     709            for (final Way way: data.searchWays(bbox)) {
    712710                if (way.isDrawable() && !data.isSelected(way)) {
    713711                    drawWay(way, 0);
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPainter.java

    r3083 r3167  
    185185
    186186        int w = icon.getIconWidth(), h=icon.getIconHeight();
    187         icon.paintIcon ( Main.map.mapView, g, p.x-w/2, p.y-h/2 );
     187        icon.paintIcon ( nc, g, p.x-w/2, p.y-h/2 );
    188188        if(name != null) {
    189189            if (inactive || n.isDisabled()) {
Note: See TracChangeset for help on using the changeset viewer.