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

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

Issue 2384593002: Encode frame number in pixel data for pose sync (Closed)
Patch Set: bajones #10: restoreStateFromContext, skip pixel read for non-async mode Created 4 years, 2 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 8e4a210338214763eee6a6e64e14e5f582f358b1..931bbc9dea513b6b116c6ab8946e3ffdf3a805e3 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
@@ -539,6 +539,21 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext {
void forceRestoreContext();
void loseContextImpl(LostContextMode, AutoRecoveryMethod);
+ enum StateMask {
+ StateInvalid = 0,
+ StateScissorEnabled = 1 << 0,
+ StateScissorBox = 1 << 1,
+ StateClearColor = 1 << 2,
+ StateClearDepthf = 1 << 3,
+ StateClearStencil = 1 << 4,
+ StateStencilMaskSeparate = 1 << 5,
+ StateColorMask = 1 << 6,
+ StateDepthMask = 1 << 7
+ };
+ // stateMask is a bit-mask of StateMask values, indicating the state
+ // settings to be restored from the saved script context.
+ void restoreStateFromContext(int stateMask);
+
gpu::gles2::GLES2Interface* contextGL() const {
DrawingBuffer* d = drawingBuffer();
if (!d)
@@ -761,6 +776,7 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext {
GLfloat m_clearColor[4];
bool m_scissorEnabled;
+ GLint m_scissorBox[4];
GLfloat m_clearDepth;
GLint m_clearStencil;
GLboolean m_colorMask[4];

Powered by Google App Engine
This is Rietveld 408576698