Class RenderBenchmarkCollector
- java.lang.Object
-
- org.openstreetmap.josm.data.osm.visitor.paint.RenderBenchmarkCollector
-
- Direct Known Subclasses:
RenderBenchmarkCollector.CapturingBenchmark
public class RenderBenchmarkCollector extends java.lang.Object
This class is notified of the various stages of a render pass.- Since:
- 10697
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRenderBenchmarkCollector.CapturingBenchmarkA benchmark implementation that captures the timesstatic classRenderBenchmarkCollector.LoggingBenchmarkA special version of the benchmark class that logs the output to stderr.
-
Constructor Summary
Constructors Constructor Description RenderBenchmarkCollector()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.function.Supplier<RenderBenchmarkCollector>defaultBenchmarkSupplier()A supplier that gets the default benchmark class.static longgetCurrentTimeMilliseconds()voidrenderDone()Notified when the render method is done.booleanrenderDraw(java.util.List<StyledMapRenderer.StyleRecord> allStyleElems)Notified when the renderer method starts drawingbooleanrenderSort()Notified when the renderer method starts sorting the stylesvoidrenderStart(double circum)Notified when the renderer method starts preparing the data
-
-
-
Constructor Detail
-
RenderBenchmarkCollector
public RenderBenchmarkCollector()
-
-
Method Detail
-
renderStart
public void renderStart(double circum)
Notified when the renderer method starts preparing the data- Parameters:
circum- The current circum of the view.
-
renderSort
public boolean renderSort()
Notified when the renderer method starts sorting the styles- Returns:
trueif the renderer should continue to render
-
renderDraw
public boolean renderDraw(java.util.List<StyledMapRenderer.StyleRecord> allStyleElems)
Notified when the renderer method starts drawing- Parameters:
allStyleElems- All the elements that are painted. Unsorted- Returns:
trueif the renderer should continue to render
-
renderDone
public void renderDone()
Notified when the render method is done.
-
getCurrentTimeMilliseconds
public static long getCurrentTimeMilliseconds()
-
defaultBenchmarkSupplier
public static java.util.function.Supplier<RenderBenchmarkCollector> defaultBenchmarkSupplier()
A supplier that gets the default benchmark class.- Returns:
- A supplier that returns a nop or a logging benchmark.
-
-