< prev index next >

openjfx9/modules/javafx.graphics/src/main/java/com/sun/marlin/RendererStats.java

Print this page

        

@@ -21,24 +21,22 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 
-package sun.java2d.marlin;
+package com.sun.marlin;
 
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.Timer;
 import java.util.TimerTask;
 import java.util.concurrent.ConcurrentLinkedQueue;
-import jdk.internal.ref.CleanerFactory;
-import sun.java2d.marlin.ArrayCacheConst.CacheStats;
-import static sun.java2d.marlin.MarlinUtils.logInfo;
-import sun.java2d.marlin.stats.Histogram;
-import sun.java2d.marlin.stats.Monitor;
-import sun.java2d.marlin.stats.StatLong;
-import sun.awt.util.ThreadGroupUtils;
+import com.sun.marlin.ArrayCacheConst.CacheStats;
+import static com.sun.marlin.MarlinUtils.logInfo;
+import com.sun.marlin.stats.Histogram;
+import com.sun.marlin.stats.Monitor;
+import com.sun.marlin.stats.StatLong;
 
 /**
  * This class gathers global rendering statistics for debugging purposes only
  */
 public final class RendererStats implements MarlinConst {

@@ -113,14 +111,10 @@
         = new StatLong("array.dasher.firstSegmentsBuffer.d_float");
     final StatLong stat_array_stroker_polystack_curves
         = new StatLong("array.stroker.polystack.curves.d_float");
     final StatLong stat_array_stroker_polystack_curveTypes
         = new StatLong("array.stroker.polystack.curveTypes.d_byte");
-    final StatLong stat_array_marlincache_rowAAChunk
-        = new StatLong("array.marlincache.rowAAChunk.resize");
-    final StatLong stat_array_marlincache_touchedTile
-        = new StatLong("array.marlincache.touchedTile.int");
     final StatLong stat_array_renderer_alphaline
         = new StatLong("array.renderer.alphaline.int");
     final StatLong stat_array_renderer_crossings
         = new StatLong("array.renderer.crossings.int");
     final StatLong stat_array_renderer_aux_crossings

@@ -146,20 +140,14 @@
         = new Histogram("renderer.crossings.adds");
     final Histogram hist_rdr_crossings_msorts
         = new Histogram("renderer.crossings.msorts");
     final Histogram hist_rdr_crossings_msorts_adds
         = new Histogram("renderer.crossings.msorts.adds");
-    final Histogram hist_tile_generator_alpha
-        = new Histogram("tile_generator.alpha");
     final Histogram hist_tile_generator_encoding
         = new Histogram("tile_generator.encoding");
     final Histogram hist_tile_generator_encoding_dist
         = new Histogram("tile_generator.encoding.dist");
-    final Histogram hist_tile_generator_encoding_ratio
-        = new Histogram("tile_generator.encoding.ratio");
-    final Histogram hist_tile_generator_encoding_runLen
-        = new Histogram("tile_generator.encoding.runLen");
     // all stats
     final StatLong[] statistics = new StatLong[]{
         stat_cache_rowAA,
         stat_cache_rowAAChunk,
         stat_cache_tiles,

@@ -188,21 +176,16 @@
         hist_rdr_crossings,
         hist_rdr_crossings_ratio,
         hist_rdr_crossings_adds,
         hist_rdr_crossings_msorts,
         hist_rdr_crossings_msorts_adds,
-        hist_tile_generator_alpha,
         hist_tile_generator_encoding,
         hist_tile_generator_encoding_dist,
-        hist_tile_generator_encoding_ratio,
-        hist_tile_generator_encoding_runLen,
         stat_array_dasher_dasher,
         stat_array_dasher_firstSegmentsBuffer,
         stat_array_stroker_polystack_curves,
         stat_array_stroker_polystack_curveTypes,
-        stat_array_marlincache_rowAAChunk,
-        stat_array_marlincache_touchedTile,
         stat_array_renderer_alphaline,
         stat_array_renderer_crossings,
         stat_array_renderer_aux_crossings,
         stat_array_renderer_edgeBuckets,
         stat_array_renderer_edgeBucketCounts,

@@ -333,11 +316,11 @@
 
         private RendererStatsHolder() {
             AccessController.doPrivileged(
                 (PrivilegedAction<Void>) () -> {
                     final Thread hook = new Thread(
-                        ThreadGroupUtils.getRootThreadGroup(),
+                        MarlinUtils.getRootThreadGroup(),
                         new Runnable() {
                             @Override
                             public void run() {
                                 dump();
                             }

@@ -363,11 +346,11 @@
 
         void add(final Object parent, final RendererStats stats) {
             allStats.add(stats);
 
             // Register a cleaning function to ensure removing dead entries:
-            CleanerFactory.cleaner().register(parent, () -> remove(stats));
+            MarlinUtils.getCleaner().register(parent, () -> remove(stats));
         }
 
         void remove(final RendererStats stats) {
             stats.dump(); // dump anyway
             allStats.remove(stats);
< prev index next >