--- old/src/share/classes/sun/java2d/SunGraphics2D.java 2009-06-22 21:32:50.000000000 +0200 +++ new/src/share/classes/sun/java2d/SunGraphics2D.java 2009-06-22 21:32:50.000000000 +0200 @@ -157,7 +157,7 @@ public TextPipe textpipe; public MaskFill alphafill; - public RenderLoops loops; + private RenderLoops loops; public CompositeType imageComp; /* Image Transparency checked on fly */ @@ -256,7 +256,6 @@ font = defaultFont; } - loops = sd.getRenderLoops(this); setDevClip(sd.getBounds()); invalidatePipe(); } @@ -366,6 +365,7 @@ shapepipe = invalidpipe; textpipe = invalidpipe; imagepipe = invalidpipe; + loops = null; } public void validatePipe() { @@ -3305,4 +3305,25 @@ public Surface getDestSurface() { return surfaceData; } + + /** + * Return the {@link RenderLoops} associated to this Graphics object. + * The returned RenderLoops may be {@code null}. Also, RenderLoops are + * always invalidated via {@link #invalidate}, so users must ensure a + * valid RenderLoops is available. + * + * @return the loops + */ + public RenderLoops getLoops() { + return loops; + } + + /** + * Sets new{@link RenderLoops} for this object. + * + * @param loops the loops to set + */ + public void setLoops(RenderLoops loops) { + this.loops = loops; + } }