Modified: trunk/Source/WebCore/ChangeLog (174793 => 174794)
--- trunk/Source/WebCore/ChangeLog 2014-10-16 21:57:49 UTC (rev 174793)
+++ trunk/Source/WebCore/ChangeLog 2014-10-16 21:58:06 UTC (rev 174794)
@@ -1,3 +1,18 @@
+2014-10-16 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r174744.
+ https://bugs.webkit.org/show_bug.cgi?id=137790
+
+ Caused another WebGL conformance test to fail (Requested by
+ rfong on #webkit).
+
+ Reverted changeset:
+
+ "glReadPixels on NVIDIA cards returns the wrong values for the
+ alpha channel when alpha is off."
+ https://bugs.webkit.org/show_bug.cgi?id=137752
+ http://trac.webkit.org/changeset/174744
+
2014-10-16 Tim Horton <[email protected]>
Implement selection services menu for Legacy WebKit
Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h (174793 => 174794)
--- trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h 2014-10-16 21:57:49 UTC (rev 174793)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h 2014-10-16 21:58:06 UTC (rev 174794)
@@ -989,7 +989,6 @@
// backbuffer.
void readRenderingResults(unsigned char* pixels, int pixelsSize);
void readPixelsAndConvertToBGRAIfNecessary(int x, int y, int width, int height, unsigned char* pixels);
- void callGLReadPixels(GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height, GC3Denum format, GC3Denum type, unsigned char* pixels);
#if PLATFORM(IOS)
bool setRenderbufferStorageFromDrawable(GC3Dsizei width, GC3Dsizei height);
Modified: trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp (174793 => 174794)
--- trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp 2014-10-16 21:57:49 UTC (rev 174793)
+++ trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp 2014-10-16 21:58:06 UTC (rev 174794)
@@ -65,7 +65,7 @@
void GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary(int x, int y, int width, int height, unsigned char* pixels)
{
- callGLReadPixels(x, y, width, height, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, pixels);
+ ::glReadPixels(x, y, width, height, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, pixels);
}
void GraphicsContext3D::validateAttributes()
@@ -356,24 +356,11 @@
::glBindFramebufferEXT(GraphicsContext3D::FRAMEBUFFER, m_fbo);
::glFlush();
}
- callGLReadPixels(x, y, width, height, format, type, static_cast<unsigned char*>(data));
-
+ ::glReadPixels(x, y, width, height, format, type, data);
if (m_attrs.antialias && m_state.boundFBO == m_multisampleFBO)
::glBindFramebufferEXT(GraphicsContext3D::FRAMEBUFFER, m_multisampleFBO);
}
-void GraphicsContext3D::callGLReadPixels(GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height, GC3Denum format, GC3Denum type, unsigned char* pixels)
-{
- ::glReadPixels(x, y, width, height, format, type, pixels);
- int totalBytes = width*height*4;
- // FIXME: There is a bug with the NVIDIA drivers where if alpha is off,
- // readPixels returns 0 for the alpha channel instead of 255.
- if (getExtensions()->isNVIDIA() && !m_attrs.alpha) {
- for (int i = 0; i < totalBytes; i += 4)
- pixels[i+3] = 255;
- }
}
-}
-
#endif // USE(3D_GRAPHICS)