< prev index next >

src/java.desktop/windows/native/libawt/windows/awt_Win32GraphicsDevice.cpp

Print this page




 912     AwtWin32GraphicsDevice::indexCMrgbID =
 913         env->GetFieldID(AwtWin32GraphicsDevice::indexCMClass, "rgb", "[I");
 914     DASSERT(AwtWin32GraphicsDevice::indexCMrgbID);
 915     CHECK_NULL(AwtWin32GraphicsDevice::indexCMrgbID);
 916 
 917     AwtWin32GraphicsDevice::indexCMcacheID =
 918         env->GetFieldID(AwtWin32GraphicsDevice::indexCMClass,
 919         "lookupcache", "[I");
 920     DASSERT(AwtWin32GraphicsDevice::indexCMcacheID);
 921     CHECK_NULL(AwtWin32GraphicsDevice::indexCMcacheID);
 922 
 923     /* method ids */
 924     AwtWin32GraphicsDevice::paletteChangedMID = env->GetStaticMethodID(
 925         AwtWin32GraphicsDevice::wToolkitClass, "paletteChanged", "()V");
 926     DASSERT(AwtWin32GraphicsDevice::paletteChangedMID);
 927     CHECK_NULL(AwtWin32GraphicsDevice::paletteChangedMID);
 928 
 929     // Only want to call this once per session
 930     make_uns_ordered_dither_array(img_oda_alpha, 256);
 931 



 932     CATCH_BAD_ALLOC;
 933 }
 934 
 935 } /* extern "C" */
 936 
 937 
 938 /*
 939  * Class:     sun_awt_Win32GraphicsDevice
 940  * Method:    getMaxConfigsImpl
 941  * Signature: ()I
 942  */
 943 
 944 JNIEXPORT jint JNICALL Java_sun_awt_Win32GraphicsDevice_getMaxConfigsImpl
 945     (JNIEnv* jniEnv, jobject theThis, jint screen) {
 946         TRY;
 947     HDC hDC = AwtWin32GraphicsDevice::GetDCFromScreen(screen);
 948 
 949     PIXELFORMATDESCRIPTOR pfd;
 950     int max = ::DescribePixelFormat(hDC, 1, sizeof(PIXELFORMATDESCRIPTOR),
 951         &pfd);




 912     AwtWin32GraphicsDevice::indexCMrgbID =
 913         env->GetFieldID(AwtWin32GraphicsDevice::indexCMClass, "rgb", "[I");
 914     DASSERT(AwtWin32GraphicsDevice::indexCMrgbID);
 915     CHECK_NULL(AwtWin32GraphicsDevice::indexCMrgbID);
 916 
 917     AwtWin32GraphicsDevice::indexCMcacheID =
 918         env->GetFieldID(AwtWin32GraphicsDevice::indexCMClass,
 919         "lookupcache", "[I");
 920     DASSERT(AwtWin32GraphicsDevice::indexCMcacheID);
 921     CHECK_NULL(AwtWin32GraphicsDevice::indexCMcacheID);
 922 
 923     /* method ids */
 924     AwtWin32GraphicsDevice::paletteChangedMID = env->GetStaticMethodID(
 925         AwtWin32GraphicsDevice::wToolkitClass, "paletteChanged", "()V");
 926     DASSERT(AwtWin32GraphicsDevice::paletteChangedMID);
 927     CHECK_NULL(AwtWin32GraphicsDevice::paletteChangedMID);
 928 
 929     // Only want to call this once per session
 930     make_uns_ordered_dither_array(img_oda_alpha, 256);
 931 
 932     // workaround JDK-6477756, ignore return value to keep dll in memory
 933     JDK_LoadSystemLibrary("opengl32.dll");
 934 
 935     CATCH_BAD_ALLOC;
 936 }
 937 
 938 } /* extern "C" */
 939 
 940 
 941 /*
 942  * Class:     sun_awt_Win32GraphicsDevice
 943  * Method:    getMaxConfigsImpl
 944  * Signature: ()I
 945  */
 946 
 947 JNIEXPORT jint JNICALL Java_sun_awt_Win32GraphicsDevice_getMaxConfigsImpl
 948     (JNIEnv* jniEnv, jobject theThis, jint screen) {
 949         TRY;
 950     HDC hDC = AwtWin32GraphicsDevice::GetDCFromScreen(screen);
 951 
 952     PIXELFORMATDESCRIPTOR pfd;
 953     int max = ::DescribePixelFormat(hDC, 1, sizeof(PIXELFORMATDESCRIPTOR),
 954         &pfd);


< prev index next >