src/solaris/classes/sun/java2d/x11/X11SurfaceData.java

Print this page




 498                 boolean needExposures = canSourceSendExposures(x, y, w, h);
 499                 long xgc = getBlitGC(sg2d.getCompClip(), needExposures);
 500                 x11pipe.devCopyArea(getNativeOps(), xgc,
 501                                     x, y,
 502                                     x + dx, y + dy,
 503                                     w, h);
 504             } finally {
 505                 SunToolkit.awtUnlock();
 506             }
 507             return true;
 508         }
 509         return false;
 510     }
 511 
 512     public static SurfaceType getSurfaceType(X11GraphicsConfig gc,
 513                                              int transparency)
 514     {
 515         return getSurfaceType(gc, transparency, false);
 516     }
 517 

 518     public static SurfaceType getSurfaceType(X11GraphicsConfig gc,
 519                                              int transparency,
 520                                              boolean pixmapSurface)
 521     {
 522         boolean transparent = (transparency == Transparency.BITMASK);
 523         SurfaceType sType;
 524         ColorModel cm = gc.getColorModel();
 525         switch (cm.getPixelSize()) {
 526         case 24:
 527             if (gc.getBitsPerPixel() == 24) {
 528                 if (cm instanceof DirectColorModel) {
 529                     // 4517321: We will always use ThreeByteBgr for 24 bpp
 530                     // surfaces, regardless of the pixel masks reported by
 531                     // X11.  Despite ambiguity in the X11 spec in how 24 bpp
 532                     // surfaces are treated, it appears that the best
 533                     // SurfaceType for these configurations (including
 534                     // some Matrox Millenium and ATI Radeon boards) is
 535                     // ThreeByteBgr.
 536                     sType = transparent ? X11SurfaceData.ThreeByteBgrX11_BM : X11SurfaceData.ThreeByteBgrX11;
 537                 } else {




 498                 boolean needExposures = canSourceSendExposures(x, y, w, h);
 499                 long xgc = getBlitGC(sg2d.getCompClip(), needExposures);
 500                 x11pipe.devCopyArea(getNativeOps(), xgc,
 501                                     x, y,
 502                                     x + dx, y + dy,
 503                                     w, h);
 504             } finally {
 505                 SunToolkit.awtUnlock();
 506             }
 507             return true;
 508         }
 509         return false;
 510     }
 511 
 512     public static SurfaceType getSurfaceType(X11GraphicsConfig gc,
 513                                              int transparency)
 514     {
 515         return getSurfaceType(gc, transparency, false);
 516     }
 517 
 518     @SuppressWarnings("fallthrough")
 519     public static SurfaceType getSurfaceType(X11GraphicsConfig gc,
 520                                              int transparency,
 521                                              boolean pixmapSurface)
 522     {
 523         boolean transparent = (transparency == Transparency.BITMASK);
 524         SurfaceType sType;
 525         ColorModel cm = gc.getColorModel();
 526         switch (cm.getPixelSize()) {
 527         case 24:
 528             if (gc.getBitsPerPixel() == 24) {
 529                 if (cm instanceof DirectColorModel) {
 530                     // 4517321: We will always use ThreeByteBgr for 24 bpp
 531                     // surfaces, regardless of the pixel masks reported by
 532                     // X11.  Despite ambiguity in the X11 spec in how 24 bpp
 533                     // surfaces are treated, it appears that the best
 534                     // SurfaceType for these configurations (including
 535                     // some Matrox Millenium and ATI Radeon boards) is
 536                     // ThreeByteBgr.
 537                     sType = transparent ? X11SurfaceData.ThreeByteBgrX11_BM : X11SurfaceData.ThreeByteBgrX11;
 538                 } else {