| Index: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
|
| index cef880da0f1f1bf886c15be64c4dec1bd9304747..714a6ab58954d108f0851fe6f86383f3a69f04df 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
|
| @@ -339,8 +339,9 @@ DrawingBuffer::TextureParameters DrawingBuffer::chromiumImageTextureParameters()
|
| parameters.creationInternalColorFormat = GL_RGB;
|
| parameters.internalColorFormat = GL_RGBA;
|
| } else {
|
| - parameters.creationInternalColorFormat = GL_RGB;
|
| - parameters.internalColorFormat = GL_RGB;
|
| + GLenum format = defaultBufferRequiresAlphaChannelToBePreserved() ? GL_RGBA : GL_RGB;
|
| + parameters.creationInternalColorFormat = format;
|
| + parameters.internalColorFormat = format;
|
| }
|
|
|
| // Unused when CHROMIUM_image is being used.
|
| @@ -360,9 +361,10 @@ DrawingBuffer::TextureParameters DrawingBuffer::defaultTextureParameters()
|
| parameters.creationInternalColorFormat = GL_RGBA;
|
| parameters.colorFormat = GL_RGBA;
|
| } else {
|
| - parameters.internalColorFormat = GL_RGB;
|
| - parameters.creationInternalColorFormat = GL_RGB;
|
| - parameters.colorFormat = GL_RGB;
|
| + GLenum format = defaultBufferRequiresAlphaChannelToBePreserved() ? GL_RGBA : GL_RGB;
|
| + parameters.creationInternalColorFormat = format;
|
| + parameters.internalColorFormat = format;
|
| + parameters.colorFormat = format;
|
| }
|
| return parameters;
|
| }
|
| @@ -1061,6 +1063,8 @@ GLenum DrawingBuffer::getMultisampledRenderbufferFormat()
|
| return GL_RGBA8_OES;
|
| if (RuntimeEnabledFeatures::webGLImageChromiumEnabled() && contextProvider()->getCapabilities().chromium_image_rgb_emulation)
|
| return GL_RGBA8_OES;
|
| + if (contextProvider()->getCapabilities().disable_webgl_rgb_multisampling_usage)
|
| + return GL_RGBA8_OES;
|
| return GL_RGB8_OES;
|
| }
|
|
|
|
|