8085910: OGL text renderer: gamma lut cleanup
authorbae
Fri, 05 Jun 2015 23:08:31 +0300
changeset 31171 59d8e7712c0b
parent 31170 4d414cfb92cc
child 31172 58f22982419a
8085910: OGL text renderer: gamma lut cleanup Reviewed-by: serb, prr
jdk/src/java.desktop/share/native/common/java2d/opengl/OGLTextRenderer.c
--- a/jdk/src/java.desktop/share/native/common/java2d/opengl/OGLTextRenderer.c	Thu Jun 04 16:18:14 2015 +0300
+++ b/jdk/src/java.desktop/share/native/common/java2d/opengl/OGLTextRenderer.c	Fri Jun 05 23:08:31 2015 +0300
@@ -95,22 +95,9 @@
 static GLhandleARB lcdTextProgram = 0;
 
 /**
- * The size of one of the gamma LUT textures in any one dimension along
- * the edge, in texels.
- */
-#define LUT_EDGE 16
-
-/**
- * These are the texture object handles for the gamma and inverse gamma
- * lookup tables.
- */
-static GLuint gammaLutTextureID = 0;
-static GLuint invGammaLutTextureID = 0;
-
-/**
  * This value tracks the previous LCD contrast setting, so if the contrast
- * value hasn't changed since the last time the lookup tables were
- * generated (not very common), then we can skip updating the tables.
+ * value hasn't changed since the last time the gamma uniforms were
+ * updated (not very common), then we can skip updating the unforms.
  */
 static jint lastLCDContrast = -1;
 
@@ -473,14 +460,6 @@
         return JNI_FALSE;
     }
 
-    // bind the gamma LUT textures
-    j2d_glActiveTextureARB(GL_TEXTURE2_ARB);
-    j2d_glBindTexture(GL_TEXTURE_3D, invGammaLutTextureID);
-    j2d_glEnable(GL_TEXTURE_3D);
-    j2d_glActiveTextureARB(GL_TEXTURE3_ARB);
-    j2d_glBindTexture(GL_TEXTURE_3D, gammaLutTextureID);
-    j2d_glEnable(GL_TEXTURE_3D);
-
     return JNI_TRUE;
 }
 
@@ -540,10 +519,6 @@
         j2d_glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
         j2d_glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
         j2d_glUseProgramObjectARB(0);
-        j2d_glActiveTextureARB(GL_TEXTURE3_ARB);
-        j2d_glDisable(GL_TEXTURE_3D);
-        j2d_glActiveTextureARB(GL_TEXTURE2_ARB);
-        j2d_glDisable(GL_TEXTURE_3D);
         j2d_glActiveTextureARB(GL_TEXTURE1_ARB);
         j2d_glDisable(GL_TEXTURE_2D);
         j2d_glActiveTextureARB(GL_TEXTURE0_ARB);