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
10namespace gfx {
11class GLContext;
12}
13
14namespace android_webview {
15
16namespace internal {
17class ScopedAppGLStateRestoreImpl;
18}
19
20// This class is not thread safe and should only be used on the UI thread.
21class 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