< prev index next >

src/solaris/classes/sun/awt/X11GraphicsConfig.java

Print this page
rev 1536 : 8147077: IllegalArgumentException thrown by api/java_awt/Component/FlipBufferStrategy/indexTGF_General
8148127: IllegalArgumentException thrown by JCK test api/java_awt/Component/FlipBufferStrategy/indexTGF_General in opengl pipeline
Reviewed-by: flar, arapte


 407         }
 408 
 409         long window = peer.getContentWindow();
 410         int swapAction = getSwapAction(caps.getFlipContents());
 411 
 412         return createBackBuffer(window, swapAction);
 413     }
 414 
 415     /**
 416      * Destroys the backbuffer object represented by the given handle value.
 417      */
 418     public native void destroyBackBuffer(long backBuffer);
 419 
 420     /**
 421      * Creates a VolatileImage that essentially wraps the target Component's
 422      * backbuffer, using the provided backbuffer handle.
 423      */
 424     public VolatileImage createBackBufferImage(Component target,
 425                                                long backBuffer)
 426     {




 427         return new SunVolatileImage(target,
 428                                     target.getWidth(), target.getHeight(),
 429                                     new Long(backBuffer));
 430     }
 431 
 432     /**
 433      * Performs the native XDBE flip operation for the given target Component.
 434      */
 435     public void flip(X11ComponentPeer peer,
 436                      Component target, VolatileImage xBackBuffer,
 437                      int x1, int y1, int x2, int y2,
 438                      BufferCapabilities.FlipContents flipAction)
 439     {
 440         long window = peer.getContentWindow();
 441         int swapAction = getSwapAction(flipAction);
 442         swapBuffers(window, swapAction);
 443     }
 444 
 445     /**
 446      * Maps the given FlipContents constant to the associated XDBE swap
 447      * action constant.
 448      */
 449     private static int getSwapAction(




 407         }
 408 
 409         long window = peer.getContentWindow();
 410         int swapAction = getSwapAction(caps.getFlipContents());
 411 
 412         return createBackBuffer(window, swapAction);
 413     }
 414 
 415     /**
 416      * Destroys the backbuffer object represented by the given handle value.
 417      */
 418     public native void destroyBackBuffer(long backBuffer);
 419 
 420     /**
 421      * Creates a VolatileImage that essentially wraps the target Component's
 422      * backbuffer, using the provided backbuffer handle.
 423      */
 424     public VolatileImage createBackBufferImage(Component target,
 425                                                long backBuffer)
 426     {
 427         // it is possible for the component to have size 0x0, adjust it to
 428         // be at least 1x1 to avoid IAE
 429         int w = Math.max(1, target.getWidth());
 430         int h = Math.max(1, target.getHeight());
 431         return new SunVolatileImage(target,
 432                                     w, h,
 433                                     Long.valueOf(backBuffer));
 434     }
 435 
 436     /**
 437      * Performs the native XDBE flip operation for the given target Component.
 438      */
 439     public void flip(X11ComponentPeer peer,
 440                      Component target, VolatileImage xBackBuffer,
 441                      int x1, int y1, int x2, int y2,
 442                      BufferCapabilities.FlipContents flipAction)
 443     {
 444         long window = peer.getContentWindow();
 445         int swapAction = getSwapAction(flipAction);
 446         swapBuffers(window, swapAction);
 447     }
 448 
 449     /**
 450      * Maps the given FlipContents constant to the associated XDBE swap
 451      * action constant.
 452      */
 453     private static int getSwapAction(


< prev index next >