Skip to content

Commit

Permalink
fixed syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
bourgesl committed Dec 19, 2016
1 parent 0b3ab91 commit 4363362
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 19 deletions.
1 change: 0 additions & 1 deletion src/main/java/org/marlin/pisces/DDasher.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

import java.util.Arrays;


/**
* The <code>DDasher</code> class takes a series of linear commands
* (<code>moveTo</code>, <code>lineTo</code>, <code>close</code> and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import java.security.AccessController;
import org.marlin.geom.Path2D;
import static org.marlin.pisces.MarlinUtils.logInfo;

import org.marlin.ReentrantContextProvider;
import org.marlin.ReentrantContextProviderCLQ;
import org.marlin.ReentrantContextProviderTL;
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/org/marlin/pisces/DRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ private void curveBreakIntoLinesAndAdd(double x0, double y0,
while (count > 0) {
// divide step by half:
while (Math.abs(ddx) + Math.abs(ddy) >= _DEC_BND) {
// while (Math.abs(ddx) >= _DEC_BND || Math.abs(ddy) >= _DEC_BND) {
dddx /= 8.0d;
dddy /= 8.0d;
ddx = ddx / 4.0d - dddx;
Expand All @@ -279,7 +278,6 @@ private void curveBreakIntoLinesAndAdd(double x0, double y0,
// double step:
// can only do this on even "count" values, because we must divide count by 2
while (count % 2 == 0
// && Math.abs(dx) <= _INC_BND && Math.abs(dy) <= _INC_BND)
&& Math.abs(dx) + Math.abs(dy) <= _INC_BND)
{
dx = 2.0d * dx + ddx;
Expand Down Expand Up @@ -618,7 +616,7 @@ DRenderer init(final int pix_boundsX, final int pix_boundsY,
/**
* Disposes this renderer and recycle it clean up before reusing this instance
*/
public void dispose() {
void dispose() {
if (DO_STATS) {
rdrCtx.stats.stat_rdr_activeEdges.add(activeEdgeMaxUsed);
rdrCtx.stats.stat_rdr_edges.add(edges.used);
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/org/marlin/pisces/DStroker.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@

import java.util.Arrays;



// TODO: some of the arithmetic here is too verbose and prone to hard to
// debug typos. We should consider making a small Point/Vector class that
// has methods like plus(Point), minus(Point), dot(Point), cross(Point)and such
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/marlin/pisces/MarlinTileGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ final class MarlinTileGenerator implements AATileGenerator, MarlinConst {
// per-thread renderer stats
final RendererStats rdrStats;

MarlinTileGenerator(final RendererStats stats, final MarlinRenderer r,
MarlinTileGenerator(final RendererStats stats, final MarlinRenderer r,
final MarlinCache cache)
{
this.rdrStats = stats;
Expand Down
22 changes: 11 additions & 11 deletions src/main/java/sun/java2d/pipe/AAShapePipe.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
public final class AAShapePipe
implements ShapeDrawPipe, ParallelogramPipe
{
static final RenderingEngine renderengine = RenderingEngine.getInstance();
static final RenderingEngine RDR_ENGINE = RenderingEngine.getInstance();

// Per-thread TileState (~1K very small so do not use any Weak Reference)
private static final ReentrantContextProvider<TileState> tileStateProvider =
private static final ReentrantContextProvider<TileState> TILE_STATE_PROVIDER =
new ReentrantContextProviderTL<TileState>(
ReentrantContextProvider.REF_HARD)
{
Expand Down Expand Up @@ -90,19 +90,19 @@ public void fillParallelogram(SunGraphics2D sg,
double dx1, double dy1,
double dx2, double dy2)
{
final TileState ts = tileStateProvider.acquire();
final TileState ts = TILE_STATE_PROVIDER.acquire();
try {
final int[] abox = ts.abox;

final AATileGenerator aatg =
renderengine.getAATileGenerator(x, y, dx1, dy1, dx2, dy2, 0, 0,
RDR_ENGINE.getAATileGenerator(x, y, dx1, dy1, dx2, dy2, 0, 0,
sg.getCompClip(), abox);
if (aatg != null) {
renderTiles(sg, ts.computeBBox(ux1, uy1, ux2, uy2),
aatg, abox, ts);
}
} finally {
tileStateProvider.release(ts);
TILE_STATE_PROVIDER.release(ts);
}
}

Expand All @@ -115,12 +115,12 @@ public void drawParallelogram(SunGraphics2D sg,
double dx2, double dy2,
double lw1, double lw2)
{
final TileState ts = tileStateProvider.acquire();
final TileState ts = TILE_STATE_PROVIDER.acquire();
try {
final int[] abox = ts.abox;

final AATileGenerator aatg =
renderengine.getAATileGenerator(x, y, dx1, dy1, dx2, dy2, lw1,
RDR_ENGINE.getAATileGenerator(x, y, dx1, dy1, dx2, dy2, lw1,
lw2, sg.getCompClip(), abox);
if (aatg != null) {
// Note that bbox is of the original shape, not the wide path.
Expand All @@ -129,7 +129,7 @@ public void drawParallelogram(SunGraphics2D sg,
aatg, abox, ts);
}
} finally {
tileStateProvider.release(ts);
TILE_STATE_PROVIDER.release(ts);
}
}

Expand All @@ -138,18 +138,18 @@ public void renderPath(SunGraphics2D sg, Shape s, BasicStroke bs) {
sg.strokeHint != SunHints.INTVAL_STROKE_PURE);
final boolean thin = (sg.strokeState <= SunGraphics2D.STROKE_THINDASHED);

final TileState ts = tileStateProvider.acquire();
final TileState ts = TILE_STATE_PROVIDER.acquire();
try {
final int[] abox = ts.abox;

final AATileGenerator aatg =
renderengine.getAATileGenerator(s, sg.transform, sg.getCompClip(),
RDR_ENGINE.getAATileGenerator(s, sg.transform, sg.getCompClip(),
bs, thin, adjust, abox);
if (aatg != null) {
renderTiles(sg, s, aatg, abox, ts);
}
} finally {
tileStateProvider.release(ts);
TILE_STATE_PROVIDER.release(ts);
}
}

Expand Down

0 comments on commit 4363362

Please sign in to comment.