Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Side by Side Diff: android_webview/browser/scoped_app_gl_state_restore.h

Issue 2375743002: [Merge M54] aw: Fix FBO restore in webview functor (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <memory> 5 #include <memory>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 9
10 namespace gl { 10 namespace gl {
(...skipping 26 matching lines...) Expand all
37 }; 37 };
38 38
39 // This class is not thread safe and should only be used on the UI thread. 39 // This class is not thread safe and should only be used on the UI thread.
40 class ScopedAppGLStateRestore { 40 class ScopedAppGLStateRestore {
41 public: 41 public:
42 enum CallMode { 42 enum CallMode {
43 MODE_DRAW, 43 MODE_DRAW,
44 MODE_RESOURCE_MANAGEMENT, 44 MODE_RESOURCE_MANAGEMENT,
45 }; 45 };
46 46
47 static ScopedAppGLStateRestore* Current();
48
47 explicit ScopedAppGLStateRestore(CallMode mode); 49 explicit ScopedAppGLStateRestore(CallMode mode);
48 ~ScopedAppGLStateRestore(); 50 ~ScopedAppGLStateRestore();
49 51
50 StencilState stencil_state() const; 52 StencilState stencil_state() const;
51 int framebuffer_binding_ext() const; 53 int framebuffer_binding_ext() const;
52 54
53 private: 55 private:
54 std::unique_ptr<internal::ScopedAppGLStateRestoreImpl> impl_; 56 std::unique_ptr<internal::ScopedAppGLStateRestoreImpl> impl_;
55 57
56 DISALLOW_COPY_AND_ASSIGN(ScopedAppGLStateRestore); 58 DISALLOW_COPY_AND_ASSIGN(ScopedAppGLStateRestore);
57 }; 59 };
58 60
59 } // namespace android_webview 61 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/render_thread_manager.cc ('k') | android_webview/browser/scoped_app_gl_state_restore.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698