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 class
RenderBenchmarkCollector.CapturingBenchmark
A benchmark implementation that captures the timesstatic class
RenderBenchmarkCollector.LoggingBenchmark
A 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 long
getCurrentTimeMilliseconds()
void
renderDone()
Notified when the render method is done.boolean
renderDraw(java.util.List<StyledMapRenderer.StyleRecord> allStyleElems)
Notified when the renderer method starts drawingboolean
renderSort()
Notified when the renderer method starts sorting the stylesvoid
renderStart(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:
true
if 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:
true
if 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.
-
-