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

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

Issue 25082006: [Android WebView] OnMemoryPressure to drop tile memory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use level Created 7 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 | Annotate | Revision Log
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 <vector> 5 #include <vector>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "ui/gl/gl_bindings.h" 8 #include "ui/gl/gl_bindings.h"
9 9
10 namespace gfx { 10 namespace gfx {
11 class GLContext; 11 class GLContext;
12 } 12 }
13 13
14 namespace android_webview { 14 namespace android_webview {
15 15
16 // This class is not thread safe and should only be used on the UI thread. 16 // This class is not thread safe and should only be used on the UI thread.
17 class ScopedAppGLStateRestore { 17 class ScopedAppGLStateRestore {
18 public: 18 public:
19 enum CallMode { 19 enum CallMode {
20 MODE_DRAW, 20 MODE_DRAW,
21 MODE_DETACH_FROM_WINDOW 21 MODE_RESOURCE_MANAGEMENT,
22 }; 22 };
23 23
24 ScopedAppGLStateRestore(CallMode mode); 24 ScopedAppGLStateRestore(CallMode mode);
25 ~ScopedAppGLStateRestore(); 25 ~ScopedAppGLStateRestore();
26 26
27 bool stencil_enabled() const { return stencil_test_; } 27 bool stencil_enabled() const { return stencil_test_; }
28 GLint framebuffer_binding_ext() const { return framebuffer_binding_ext_; } 28 GLint framebuffer_binding_ext() const { return framebuffer_binding_ext_; }
29 29
30 private: 30 private:
31 const CallMode mode_; 31 const CallMode mode_;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 GLint texture_external_oes; 92 GLint texture_external_oes;
93 // TODO(boliu): TEXTURE_RECTANGLE_ARB 93 // TODO(boliu): TEXTURE_RECTANGLE_ARB
94 }; 94 };
95 95
96 std::vector<TextureBindings> texture_bindings_; 96 std::vector<TextureBindings> texture_bindings_;
97 97
98 DISALLOW_COPY_AND_ASSIGN(ScopedAppGLStateRestore); 98 DISALLOW_COPY_AND_ASSIGN(ScopedAppGLStateRestore);
99 }; 99 };
100 100
101 } // namespace android_webview 101 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698