From 215cbe50aaf22b3914fbfa4f3869dde4b7e0622c Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 28 Aug 2014 05:55:56 +0200 Subject: GLStateTracker: Avoid private access wrapper, reuse fetched pixelStateMap --- src/jogl/classes/jogamp/opengl/GLStateTracker.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/jogl') diff --git a/src/jogl/classes/jogamp/opengl/GLStateTracker.java b/src/jogl/classes/jogamp/opengl/GLStateTracker.java index d532a2567..dc49b35f4 100644 --- a/src/jogl/classes/jogamp/opengl/GLStateTracker.java +++ b/src/jogl/classes/jogamp/opengl/GLStateTracker.java @@ -68,7 +68,7 @@ public class GLStateTracker { private IntIntHashMap pixelStateMap; private final ArrayList stack; - private static class SavedState { + static class SavedState { /** * Empty pixel-store state @@ -78,15 +78,14 @@ public class GLStateTracker { /** * set (client) pixel-store state, deep copy */ - private final void setPixelStateMap(final IntIntHashMap pixelStateMap) { + final void setPixelStateMap(final IntIntHashMap pixelStateMap) { this.pixelStateMap = (IntIntHashMap) pixelStateMap.clone(); } /** * get (client) pixel-store state, return reference */ - private final IntIntHashMap getPixelStateMap() { return pixelStateMap; } - + final IntIntHashMap getPixelStateMap() { return pixelStateMap; } } @@ -163,10 +162,11 @@ public class GLStateTracker { if(null==state) { throw new GLException("null stack element (remaining stack size "+stack.size()+")"); } + final IntIntHashMap statePixelStateMap = state.getPixelStateMap(); - if ( null != state.getPixelStateMap() ) { + if ( null != statePixelStateMap ) { // use pulled client pixel-store state from stack - pixelStateMap = state.getPixelStateMap(); + pixelStateMap = statePixelStateMap; } // else: empty-slot, not pushed by GL_CLIENT_PIXEL_STORE_BIT } } -- cgit v1.2.3