summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-08-28 05:55:56 +0200
committerSven Gothel <[email protected]>2014-08-28 05:55:56 +0200
commit215cbe50aaf22b3914fbfa4f3869dde4b7e0622c (patch)
tree70a49dec88c38a186e148b9e417ded1234b321fa
parent00cb1f67423fa2c23f55cc616806f0779f70ac89 (diff)
GLStateTracker: Avoid private access wrapper, reuse fetched pixelStateMap
-rw-r--r--src/jogl/classes/jogamp/opengl/GLStateTracker.java12
1 files changed, 6 insertions, 6 deletions
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<SavedState> 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
}
}