Bug 1306171 - Expect core profiles to fill in alpha for RGB->RGBA reads properly. - r=mtseng
--- a/gfx/gl/GLReadTexImageHelper.cpp
+++ b/gfx/gl/GLReadTexImageHelper.cpp
@@ -412,16 +412,17 @@ ReadPixelsIntoDataSurface(GLContext* gl,
gfx::Factory::CopyDataSourceSurface(readSurf, dest);
}
// Check if GL is giving back 1.0 alpha for
// RGBA reads to RGBA images from no-alpha buffers.
#ifdef XP_MACOSX
if (gl->WorkAroundDriverBugs() &&
gl->Vendor() == gl::GLVendor::NVIDIA &&
+ !gl->IsCoreProfile() &&
hasAlpha &&
width && height)
{
GLint alphaBits = 0;
gl->fGetIntegerv(LOCAL_GL_ALPHA_BITS, &alphaBits);
if (!alphaBits) {
const uint32_t alphaMask = gfxPackedPixelNoPreMultiply(0xff,0,0,0);