Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ui / gl / scoped_make_current.h
blob59f34d76bb6a9f4994b633d85d1c09b28c0dfcb8
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_GL_SCOPED_MAKE_CURRENT_H_
6 #define UI_GL_SCOPED_MAKE_CURRENT_H_
8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h"
10 #include "ui/gl/gl_export.h"
12 namespace gfx {
13 class GLContext;
14 class GLSurface;
17 namespace ui {
19 class GL_EXPORT ScopedMakeCurrent {
20 public:
21 ScopedMakeCurrent(gfx::GLContext* context, gfx::GLSurface* surface);
22 ~ScopedMakeCurrent();
24 bool Succeeded() const;
26 private:
27 scoped_refptr<gfx::GLContext> previous_context_;
28 scoped_refptr<gfx::GLSurface> previous_surface_;
29 scoped_refptr<gfx::GLContext> context_;
30 scoped_refptr<gfx::GLSurface> surface_;
31 bool succeeded_;
33 DISALLOW_COPY_AND_ASSIGN(ScopedMakeCurrent);
36 } // namespace ui
38 #endif // UI_GL_SCOPED_MAKE_CURRENT_H_