Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(650)

Unified Diff: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h

Issue 1856933002: WebGL GL_RGB emulation to support IOSurfaces on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Full client side implementation of GL_RGB emulation. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 5981cd97f34ee6d61e445ea2baf674ca33a2e422..4c51e6c8bc7d2e9987729fe2460164b87df48c0e 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h
+++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h
@@ -158,6 +158,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();
@@ -292,6 +298,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.

Powered by Google App Engine
This is Rietveld 408576698