| Index: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h
|
| diff --git a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h
|
| index 4d1e7bed0b4aca88899abb49ee5e8d63e603672b..9e95a17e84e2dda59096f6f5c8e752ae31f8fc72 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h
|
| +++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h
|
| @@ -143,6 +143,14 @@ public:
|
| }
|
| }
|
|
|
| + // The DrawingBuffer needs to track the currently bound renderbuffer so it
|
| + // restore the binding when needed.
|
| + void setRenderbufferBinding(GLuint renderbuffer)
|
| + {
|
| + m_renderbufferBinding = renderbuffer;
|
| + }
|
| +
|
| +
|
| // Track the currently active texture unit. Texture unit 0 is used as host for a scratch
|
| // texture.
|
| void setActiveTextureUnit(GLint textureUnit) { m_activeTextureUnit = textureUnit; }
|
| @@ -159,6 +167,12 @@ public:
|
| void setIsHidden(bool);
|
| void setFilterQuality(SkFilterQuality);
|
|
|
| + // Indicates that the currently bound framebuffer has internalformat
|
| + // GL_RGBA, but is emulating GL_RGB. This happens to the backbuffer when the
|
| + // client requests alpha:False, but GL_RGB textures are unusable because of
|
| + // driver bugs.
|
| + bool requiresRGBEmulation();
|
| +
|
| WebLayer* platformLayer();
|
|
|
| WebGraphicsContext3D* context();
|
| @@ -202,12 +216,18 @@ private:
|
| DISALLOW_NEW();
|
| GLenum target;
|
| GLenum internalColorFormat;
|
| +
|
| + // The internal color format used when allocating storage for the
|
| + // texture. This may be different from internalColorFormat if RGB
|
| + // emulation is required.
|
| + GLenum creationInternalColorFormat;
|
| GLenum colorFormat;
|
| GLenum internalRenderbufferFormat;
|
|
|
| TextureParameters()
|
| : target(0)
|
| , internalColorFormat(0)
|
| + , creationInternalColorFormat(0)
|
| , colorFormat(0)
|
| , internalRenderbufferFormat(0)
|
| {
|
| @@ -293,6 +313,10 @@ private:
|
| // Allocate buffer storage to be sent to compositor using either texImage2D or CHROMIUM_image based on available support.
|
| void deleteChromiumImageForTexture(TextureInfo*);
|
|
|
| + // If RGB emulation is required, then the CHROMIUM image must be immediately
|
| + // cleared after it is bound to a texture.
|
| + void clearChromiumImageIfNecessary(const TextureInfo&);
|
| +
|
| // Tries to create a CHROMIUM_image backed texture if
|
| // RuntimeEnabledFeatures::webGLImageChromiumEnabled() is true. On failure,
|
| // or if the flag is false, creates a default texture.
|
| @@ -310,6 +334,7 @@ private:
|
| GLuint m_texture2DBinding;
|
| GLuint m_drawFramebufferBinding;
|
| GLuint m_readFramebufferBinding;
|
| + GLuint m_renderbufferBinding;
|
| GLenum m_activeTextureUnit;
|
|
|
| OwnPtr<WebGraphicsContext3DProvider> m_contextProvider;
|
| @@ -337,6 +362,8 @@ private:
|
|
|
| // For multisampling.
|
| GLuint m_multisampleFBO;
|
| + GLuint m_multisampleIntermediateFBO;
|
| + GLuint m_multisampleIntermediateRenderbuffer;
|
| GLuint m_multisampleColorBuffer;
|
|
|
| // True if our contents have been modified since the last presentation of this buffer.
|
|
|