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
933 static HMODULE libOpenGL32 = NULL;
934 if (libOpenGL32 == NULL) {
935 libOpenGL32 = JDK_LoadSystemLibrary("opengl32.dll");
936 }
937
938 CATCH_BAD_ALLOC;
939 }
940
941 } /* extern "C" */
942
943
944 /*
945 * Class: sun_awt_Win32GraphicsDevice
946 * Method: getMaxConfigsImpl
947 * Signature: ()I
948 */
949
950 JNIEXPORT jint JNICALL Java_sun_awt_Win32GraphicsDevice_getMaxConfigsImpl
951 (JNIEnv* jniEnv, jobject theThis, jint screen) {
952 TRY;
953 HDC hDC = AwtWin32GraphicsDevice::GetDCFromScreen(screen);
954
955 PIXELFORMATDESCRIPTOR pfd;
956 int max = ::DescribePixelFormat(hDC, 1, sizeof(PIXELFORMATDESCRIPTOR),
957 &pfd);
|