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]; |