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

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h

Issue 2535173002: Prevent implicit framebuffer clear from clobbering alpha in emulated RGB (Closed)
Patch Set: remove unnecessary std::list Created 4 years 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 a7b105741259c5e6c2394d39e2cb4c2884ff18e0..6f6d832cdece214179587a4f5e695417673c46a8 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
@@ -110,14 +110,16 @@ class WebGLRenderingContextErrorMessageCallback;
// This class uses the color mask to prevent drawing to the alpha channel, if
// the DrawingBuffer requires RGB emulation.
class ScopedRGBEmulationColorMask {
+ STACK_ALLOCATED();
+
public:
- ScopedRGBEmulationColorMask(gpu::gles2::GLES2Interface*,
+ ScopedRGBEmulationColorMask(WebGLRenderingContextBase*,
GLboolean* colorMask,
DrawingBuffer*);
~ScopedRGBEmulationColorMask();
private:
- gpu::gles2::GLES2Interface* m_contextGL;
+ Member<WebGLRenderingContextBase> m_context;
GLboolean m_colorMask[4];
const bool m_requiresEmulation;
};
@@ -1533,6 +1535,9 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext,
static WebGLRenderingContextBase* oldestContext();
static WebGLRenderingContextBase* oldestEvictedContext();
+ friend class ScopedRGBEmulationColorMask;
+ unsigned m_activeScopedRGBEmulationColorMasks;
+
ImageBitmap* transferToImageBitmapBase(ScriptState*);
// Helper functions for tex(Sub)Image2D && texSubImage3D

Powered by Google App Engine
This is Rietveld 408576698