Bug 1306171 - Expect core profiles to fill in alpha for RGB->RGBA reads properly. - r=mtseng draft
authorJeff Gilbert <jdashg@gmail.com>
Tue, 27 Sep 2016 13:20:12 -0700
changeset 418728 841ae2ed4e43701a23c15738f717ab95bd097bac
parent 418263 fa29485efec0edaae7444ed651982ce5c3beeb95
child 418729 dfc3b67d0e3b195557563c4bf548ce1e28af585e
push id30766
push userbmo:jgilbert@mozilla.com
push dateThu, 29 Sep 2016 01:51:52 +0000
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);