Chromium Code Reviews| Index: Source/core/html/canvas/WebGLRenderingContext.h |
| diff --git a/Source/core/html/canvas/WebGLRenderingContext.h b/Source/core/html/canvas/WebGLRenderingContext.h |
| index 5314306c138a2396bd33bbcb2c1fd2d21cfa6209..eaadaafdaf9f35d7691aeaeeaa29db3be1801e3c 100644 |
| --- a/Source/core/html/canvas/WebGLRenderingContext.h |
| +++ b/Source/core/html/canvas/WebGLRenderingContext.h |
| @@ -29,6 +29,7 @@ |
| #include "core/dom/ActiveDOMObject.h" |
| #include "core/html/canvas/CanvasRenderingContext.h" |
| #include "core/html/canvas/WebGLGetInfo.h" |
| +#include "core/page/Page.h" |
| #include "core/platform/Timer.h" |
| #include "core/platform/graphics/GraphicsContext3D.h" |
| #include "core/platform/graphics/ImageBuffer.h" |
| @@ -294,7 +295,10 @@ public: |
| RealLostContext, |
| // Lost context provoked by WEBKIT_lose_context. |
| - SyntheticLostContext |
| + SyntheticLostContext, |
| + |
| + // A synthetic lost context that should attempt to recover automatically |
| + AutoRecoverSyntheticLostContext |
| }; |
| void forceLostContext(LostContextMode); |
| void forceRestoreContext(); |
| @@ -331,7 +335,7 @@ public: |
| friend class WebGLRenderingContextErrorMessageCallback; |
| friend class WebGLVertexArrayObjectOES; |
| - WebGLRenderingContext(HTMLCanvasElement*, PassRefPtr<GraphicsContext3D>, GraphicsContext3D::Attributes); |
| + WebGLRenderingContext(HTMLCanvasElement*, PassRefPtr<GraphicsContext3D>, GraphicsContext3D::Attributes, GraphicsContext3D::Attributes); |
| void initializeNewContext(); |
| void setupFlags(); |
| @@ -493,6 +497,7 @@ public: |
| bool m_contextLost; |
| LostContextMode m_contextLostMode; |
| GraphicsContext3D::Attributes m_attributes; |
| + GraphicsContext3D::Attributes m_requestedAttributes; |
| bool m_layerCleared; |
| GC3Dfloat m_clearColor[4]; |
| @@ -769,6 +774,20 @@ public: |
| void restoreCurrentFramebuffer(); |
| void restoreCurrentTexture2D(); |
| + class WebGLSettingsChangedObserver : public Page::SettingsChangedObserver, public RefCounted<WebGLSettingsChangedObserver> { |
| + public: |
| + WebGLSettingsChangedObserver(WebGLRenderingContext*, Page*); |
| + virtual void settingsChanged(Settings*); |
| + virtual ~WebGLSettingsChangedObserver(); |
| + |
| + private: |
| + WebGLRenderingContext* m_context; |
| + Page* m_page; |
|
abarth-chromium
2013/05/06 21:58:30
This object is RefCounted but it holds raw pointer
|
| + bool m_multisamplingAllowed; |
| + }; |
| + |
| + RefPtr<WebGLSettingsChangedObserver> m_settingsChangedObserver; |
| + |
| friend class WebGLStateRestorer; |
| friend class WebGLRenderingContextEvictionManager; |