Chromium Code Reviews| Index: Source/core/html/canvas/WebGLExtension.h |
| diff --git a/Source/core/html/canvas/WebGLExtension.h b/Source/core/html/canvas/WebGLExtension.h |
| index 6cef3af7c853dab86f5641e48b096c2ca9469e44..8fe34903d91d4092bcdf7627eb74f3dd0a2ac82d 100644 |
| --- a/Source/core/html/canvas/WebGLExtension.h |
| +++ b/Source/core/html/canvas/WebGLExtension.h |
| @@ -59,10 +59,30 @@ public: |
| virtual ~WebGLExtension(); |
| virtual ExtensionName getName() const = 0; |
| + virtual void enable() = 0; |
| + |
| + void restore() |
|
Ken Russell (switch to Gerrit)
2013/06/05 00:46:38
Is a restore() method needed? As I understand it,
|
| + { |
| + m_lost = false; |
| + enable(); |
| + } |
| + |
| + virtual void lose() |
| + { |
| + m_lost = true; |
| + } |
| + |
| + bool isLost() |
| + { |
| + return m_lost || m_context->isContextLost(); |
| + } |
| protected: |
| WebGLExtension(WebGLRenderingContext*); |
| + |
| WebGLRenderingContext* m_context; |
| + bool m_lost; |
|
Ken Russell (switch to Gerrit)
2013/06/05 00:46:38
Should m_lost be private instead?
|
| + |
| }; |
| } // namespace WebCore |