Bug 1306171 - Expect core profiles to fill in alpha for RGB->RGBA reads properly. - r=mtseng
authorJeff Gilbert <jdashg@gmail.com>
Tue, 27 Sep 2016 13:20:12 -0700
changeset 315923 42a1e4dd9f789675c3d8656b4a340a162ec590e1
parent 315922 0d50320d6916ab7c21348a7532c828e5390ba0a6
child 315924 0cc441ce2c8c394767c8f3161fad0047555dbaac
push id20634
push usercbook@mozilla.com
push dateFri, 30 Sep 2016 10:10:13 +0000
treeherderfx-team@afe79b010d13 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmtseng
bugs1306171
milestone52.0a1
Bug 1306171 - Expect core profiles to fill in alpha for RGB->RGBA reads properly. - r=mtseng
gfx/gl/GLReadTexImageHelper.cpp
--- 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);