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

Added mappaint performance test

Location:
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 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.