From a53e87a84c92444e8a3173f25ce86dcfd536d6a8 Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Sat, 6 Dec 2014 21:12:18 +0100
Subject: Bug 1107 - Refine PixelFormat, GLPixelBuffer and
 DirectDataBufferInt/BufferedImageInt

- PixelFormat
  Refine definition allowing complete format conversion by its attributes
  instead of static 'knowledge'.

  - PixelFormat has_a *new* PixelFormat.Composition

  - PixelFormat.Composition contains all pixel component layout
    information as required for inspection and conversion.
    Component names are enumerated via PixelFormat.CType.

  - PixelFormatUtil.convert(..) utilizes generic conversion
    based on PixelFormat.Composition rather static type mapping.
    However, a int32 RGBA static conversion is still supported for performance.
    Utilizes Bitstream for varying pixel component bit-width.

  - Complete w/ hashCode() and equals(..)

- GLPixelBuffer
  - Take 'pack' mode into account when determine GLPixelAttributes,
    i.e. on GLES pack=true (e.g. glReadPixel) only RGBA is guaranteed to work.
    Hence querying GLPixelAttributes requires the GLProfile, PixelFormat and pack mode.

  - Complete GLPixelAttributes conversions from PixelFormat or GL format/data-type,
    while taking GL data-type into account, as well as pack-mode.

  - Complete w/ hashCode() and equals(..)

  - SingletonGLPixelBufferProvider queries singleton GLPixelBuffer via
      - PixelFormat.Composition hostPixelComp,
      - GLPixelAttributes pixelAttributes,
      - boolean pack
    which comprise a unique key, allowing the implementation to utilize
    a hash map. This is implemented in AWTSingletonGLPixelBufferProvider.
    This allows distinct singleton GLPixelBuffer for different
    host PixelFormat (conversion) and GLPixelAttributes (depending on GLProfile).

  - Removes field 'componentCount' which was 'hacked in' to pass
    information about an optional host memory layout.
    Implementations utilizing conversion, e.g. AWTGLPixelBuffer,
    can implement GLPixelBufferProvider's
      'PixelFormat.Composition getHostPixelComp(final GLProfile glp, final int componentCount)'
    and manage such implementation details, see use-case GLJPanel.

- DirectDataBufferInt/BufferedImageInt: Expose underlying NIO ByteBuffer

- AWTMisc.createCursor(..) uses DirectDataBufferInt.BufferedImageInt exposed
  NIO ByteBuffer, allowing to use generic PixelFormatUtil.convert(..).
---
 make/scripts/tests.sh | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

(limited to 'make/scripts/tests.sh')

diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh
index 00bd8571e..dc6802bb4 100644
--- a/make/scripts/tests.sh
+++ b/make/scripts/tests.sh
@@ -116,6 +116,7 @@ function jrun() {
 
     #D_ARGS="-Dnativewindow.debug.X11Util.ATI_HAS_NO_XCLOSEDISPLAY_BUG"
     #D_ARGS="-Dnativewindow.debug.X11Util.ATI_HAS_NO_MULTITHREADING_BUG"
+    #D_ARGS="-Djogl.disable.opengldesktop"
     #D_ARGS="-Djogl.disable.opengles"
     #D_ARGS="-Djogl.disable.openglcore"
     #D_ARGS="-Djogl.disable.openglarbcontext"
@@ -150,6 +151,12 @@ function jrun() {
     #D_ARGS="-Djogl.debug.GLContext -Djogl.debug.GLDrawable -Dnativewindow.debug.GraphicsConfiguration"
     #D_ARGS="-Dnativewindow.debug.GraphicsConfiguration"
     #D_ARGS="-Djogl.debug.GLContext -Djogl.debug.GLDrawable"
+    #D_ARGS="-Djogl.debug.GLContext -Djogl.debug.GLDrawable -Djogl.debug.GLProfile -Djogamp.common.utils.locks.Lock.timeout=600000 -Djogamp.debug.Lock"
+    #D_ARGS="-Djogl.debug.GLContext -Djogl.debug.GLDrawable -Dnativewindow.debug.ProxySurface -Djogl.debug.GLProfile -Djogl.disable.opengldesktop"
+    #D_ARGS="-Djogl.debug.GLContext -Djogl.debug.GLDrawable -Dnativewindow.debug.ProxySurface -Djogl.debug.GLProfile"
+    #D_ARGS="-Djogl.disable.surfacelesscontext -Djogl.debug.GLContext -Djogl.debug.GLDrawable -Djogl.debug.GLJPanel -Djogl.debug.DebugGL"
+    #D_ARGS="-Djogl.debug.GLContext -Djogl.debug.GLJPanel -Djogl.debug.DebugGL"
+    #D_ARGS="-Djogl.debug.GLJPanel"
     #D_ARGS="-Djogl.debug.GLContext.NoProfileAliasing"
     #D_ARGS="-Djogl.debug.GLDrawable -Dnativewindow.debug.X11Util -Dnativewindow.debug.NativeWindow -Dnewt.debug.Display -Dnewt.debug.Screen -Dnewt.debug.Window"
     #D_ARGS="-Djogl.debug.Animator"
@@ -398,8 +405,8 @@ function testawtswt() {
 # HiDPI
 #
 #testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT $*
+testawt com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2GLJPanelAWT $*
 #testawt com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2AWT $*
-#testawt com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2GLJPanelAWT $*
 #testawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NewtCanvasAWT $*
 #testnoawt com.jogamp.opengl.test.junit.jogl.glsl.TestRulerNEWT01 $*
 #testnoawt com.jogamp.opengl.test.junit.graph.demos.GPUUISceneNewtDemo $*
@@ -589,7 +596,7 @@ function testawtswt() {
 
 #testnoawt com.jogamp.opengl.test.junit.newt.TestWindows01NEWT $*
 #testnoawt com.jogamp.opengl.test.junit.newt.TestWindowClosingProtocol02NEWT $*
-testnoawt com.jogamp.opengl.test.junit.newt.TestWindowAndPointerIconNEWT $*
+#testnoawt com.jogamp.opengl.test.junit.newt.TestWindowAndPointerIconNEWT $*
 #testnoawt com.jogamp.opengl.test.junit.newt.TestGLWindows01NEWT $*
 #testnoawt com.jogamp.opengl.test.junit.newt.TestGLWindows02NEWTAnimated $*
 #testnoawt com.jogamp.opengl.test.junit.newt.TestGLWindows03NEWTAnimResize $*
@@ -785,13 +792,14 @@ testnoawt com.jogamp.opengl.test.junit.newt.TestWindowAndPointerIconNEWT $*
 #testawt com.jogamp.opengl.test.junit.jogl.util.texture.TestTexture02AWT $*
 
 #testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestJPEGImage01NEWT $*
-#testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestJPEGJoglAWTCompareNewtAWT $*
-#testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestJPEGJoglAWTBenchmarkNewtAWT $*
+#testawt com.jogamp.opengl.test.junit.jogl.util.texture.TestJPEGJoglAWTCompareNewtAWT $*
+#testawt com.jogamp.opengl.test.junit.jogl.util.texture.TestJPEGJoglAWTBenchmarkNewtAWT $*
 #testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestJPEGTextureFromFileNEWT $*
-#testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestPNGPixelRect00NEWT $*
-#testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestPNGPixelRect01NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestPixelFormat00NEWT $*
 #testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestPixelFormatUtil00NEWT $*
 #testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestPixelFormatUtil01NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestPNGPixelRect00NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestPNGPixelRect01NEWT $*
 #testawt com.jogamp.opengl.test.junit.jogl.util.texture.TestPNGTextureFromFileAWT $*
 #testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestPNGTextureFromFileNEWT $*
 #testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestTGATextureFromFileNEWT $*
-- 
cgit v1.2.3