Changeset 4087 in josm for trunk/test/performance


Ignore:
Timestamp:
2011-05-15T23:51:25+02:00 (14 years ago)
Author:
bastiK
Message:

PaintVisitor refactoring, includes hook for external MapRenderers (author: Gubaer)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/performance/org/openstreetmap/josm/data/osm/MapPaintVisitorPerformanceTest.java

    r3350 r4087  
    1010import org.openstreetmap.josm.Main;
    1111import org.openstreetmap.josm.data.Bounds;
    12 import org.openstreetmap.josm.data.osm.visitor.paint.MapPaintVisitor;
    13 import org.openstreetmap.josm.data.osm.visitor.paint.PaintVisitor;
     12import org.openstreetmap.josm.data.osm.visitor.paint.Rendering;
     13import org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer;
    1414import org.openstreetmap.josm.data.projection.Mercator;
    1515import org.openstreetmap.josm.gui.NavigatableComponent;
     
    5252
    5353    private static void test(int iterations, DataSet ds, Bounds bounds) throws Exception {
    54         PaintVisitor visitor = new MapPaintVisitor();
     54        Rendering visitor = new StyledMapRenderer(g,nc,false);
    5555        nc.zoomTo(bounds);
    56         visitor.setGraphics(g);
    57         visitor.setNavigatableComponent(nc);
    58         visitor.setInactive(false);
    5956        for (int i=0; i<iterations; i++) {
    60             visitor.visitAll(ds, true, bounds);
     57            visitor.render(ds, true, bounds);
    6158        }
    6259    }
Note: See TracChangeset for help on using the changeset viewer.