From 507113e471e165d151bc152989e687439312686a Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 5 Nov 2013 12:58:36 +0100 Subject: Bug 888 / Bug 891- Enhance GLCapabilities-Query: Add perf. test case Even though the test case itself cannot show the proper initialization time, it can be used w/ an attached profiler i.e. Test w/ 50 X11GLXGraphicsConfigurationFactory.chooseGraphicsConfigurationFBConfig() invocations: - pre change: 1.708 ms - post change: 650 ms (613e33ee8ffc1f2b9c5db1e1b5bb5253a159ed6d) --- src/jogl/classes/javax/media/opengl/awt/GLJPanel.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/jogl') diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java index fdacc5bc4..1adafaf87 100644 --- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java +++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java @@ -476,13 +476,12 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing } if( isVisible() ) { - updater.setGraphics(g); - backend.doPaintComponent(g); + updater.setGraphics(g); + backend.doPaintComponent(g); } } } - /** Overridden to track when this component is added to a container. Subclasses which override this method must call super.addNotify() in their addNotify() method in order to @@ -1842,7 +1841,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing @Override public boolean preGL(Graphics g) { - GL2 gl = joglContext.getGL().getGL2(); + final GL2 gl = joglContext.getGL().getGL2(); // Set up needed state in JOGL context from Java2D context gl.glEnable(GL2.GL_SCISSOR_TEST); Rectangle r = Java2D.getOGLScissorBox(g); -- cgit v1.2.3