• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2013 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.
4 
5 #include <vector>
6 
7 #include "base/basictypes.h"
8 #include "base/memory/scoped_ptr.h"
9 
10 namespace gfx {
11 class GLContext;
12 }
13 
14 namespace android_webview {
15 
16 namespace internal {
17 class ScopedAppGLStateRestoreImpl;
18 }
19 
20 // This class is not thread safe and should only be used on the UI thread.
21 class ScopedAppGLStateRestore {
22  public:
23   enum CallMode {
24     MODE_DRAW,
25     MODE_RESOURCE_MANAGEMENT,
26   };
27 
28   ScopedAppGLStateRestore(CallMode mode);
29   ~ScopedAppGLStateRestore();
30 
31   bool stencil_enabled() const;
32   int framebuffer_binding_ext() const;
33 
34  private:
35   scoped_ptr<internal::ScopedAppGLStateRestoreImpl> impl_;
36 
37   DISALLOW_COPY_AND_ASSIGN(ScopedAppGLStateRestore);
38 };
39 
40 }  // namespace android_webview
41