| Index: ui/gl/gl_context.h
|
| diff --git a/ui/gl/gl_context.h b/ui/gl/gl_context.h
|
| index f40b1bba78647ab9ef7090ffa420e4c5ba1b739c..63589c7cf3827edf3a3e4c4e32071d7162ec3e75 100644
|
| --- a/ui/gl/gl_context.h
|
| +++ b/ui/gl/gl_context.h
|
| @@ -117,6 +117,18 @@ class GL_EXPORT GLContext : public base::RefCounted<GLContext> {
|
| protected:
|
| virtual ~GLContext();
|
|
|
| + // Will release the current context when going out of scope, unless canceled.
|
| + class ScopedReleaseCurrent {
|
| + public:
|
| + ScopedReleaseCurrent();
|
| + ~ScopedReleaseCurrent();
|
| +
|
| + void Cancel();
|
| +
|
| + private:
|
| + bool canceled_;
|
| + };
|
| +
|
| // Sets the GL api to the real hardware API (vs the VirtualAPI)
|
| static void SetRealGLApi();
|
| virtual void SetCurrent(GLSurface* surface);
|
|
|