< prev index next >
src/java.desktop/share/classes/sun/java2d/marlin/RendererContext.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -33,11 +33,11 @@
import sun.java2d.marlin.MarlinRenderingEngine.NormalizingPathIterator;
/**
* This class is a renderer context dedicated to a single thread
*/
-final class RendererContext extends ReentrantContext implements MarlinConst {
+final class RendererContext extends ReentrantContext implements IRendererContext {
// RendererContext creation counter
private static final AtomicInteger CTX_COUNT = new AtomicInteger(1);
/**
@@ -119,11 +119,11 @@
transformerPC2D = new TransformingPathConsumer2D();
// Renderer:
cache = new MarlinCache(this);
renderer = new Renderer(this); // needs MarlinCache from rdrCtx.cache
- ptg = new MarlinTileGenerator(renderer);
+ ptg = new MarlinTileGenerator(stats, renderer, cache);
stroker = new Stroker(this);
dasher = new Dasher(this);
}
@@ -172,18 +172,25 @@
// reset the path anyway:
p2d.reset();
return p2d;
}
- OffHeapArray newOffHeapArray(final long initialSize) {
+ @Override
+ public RendererStats stats() {
+ return stats;
+ }
+
+ @Override
+ public OffHeapArray newOffHeapArray(final long initialSize) {
if (DO_STATS) {
stats.totalOffHeapInitial += initialSize;
}
return new OffHeapArray(cleanerObj, initialSize);
}
- IntArrayCache.Reference newCleanIntArrayRef(final int initialSize) {
+ @Override
+ public IntArrayCache.Reference newCleanIntArrayRef(final int initialSize) {
return cleanIntCache.createRef(initialSize);
}
IntArrayCache.Reference newDirtyIntArrayRef(final int initialSize) {
return dirtyIntCache.createRef(initialSize);
< prev index next >