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

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.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: Comments from kbr. 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/modules/webgl/WebGLRenderingContextBase.h
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
index 0ec433698eb200967e720a8baf3e32f7bff34357..15fcc1a73fd06f91b0d65a55777a5a05f92296b6 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
@@ -138,6 +138,19 @@ private:
Member<WebGLFramebuffer> m_readFramebufferBinding;
};
+// This class uses the color mask to prevent drawing to the alpha channel, if
+// the DrawingBuffer requires RGB emulation.
+class ScopedRGBEmulationColorMask {
+public:
+ ScopedRGBEmulationColorMask(gpu::gles2::GLES2Interface*, GLboolean* colorMask, DrawingBuffer*);
+ ~ScopedRGBEmulationColorMask();
+
+private:
+ gpu::gles2::GLES2Interface* m_contextGL;
+ GLboolean m_colorMask[4];
+ const bool m_requiresEmulation;
+};
+
class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext {
public:
~WebGLRenderingContextBase() override;

Powered by Google App Engine
This is Rietveld 408576698