Bug 1306171 - Expect core profiles to fill in alpha for RGB->RGBA reads properly. - r=mtseng, a=gchang
authorJeff Gilbert <jdashg@gmail.com>
Tue, 27 Sep 2016 13:20:12 -0700
changeset 356564 03c71ac83a13e9618b48de8c0f6194df48124b2d
parent 356563 06660e22513db840537ff6a9bd8875bdb7a83ffe
child 356565 59c498f1a9888ea94fc271ea3da339555028f976
push id6570
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:26:13 +0000
treeherdermozilla-beta@f455459b2ae5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmtseng, gchang
bugs1306171
milestone51.0a2
Bug 1306171 - Expect core profiles to fill in alpha for RGB->RGBA reads properly. - r=mtseng, a=gchang
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);