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

Unified Diff: android_webview/browser/shared_renderer_state.h

Issue 226363004: Global GPU memory manager for android webview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Type casts and private methods in BVR. Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « android_webview/browser/hardware_renderer.cc ('k') | android_webview/browser/shared_renderer_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/shared_renderer_state.h
diff --git a/android_webview/browser/shared_renderer_state.h b/android_webview/browser/shared_renderer_state.h
index c2c1eee864b0d8025c65ad819a54823138f52a84..9c90731d7ad33f99baa1a13978ca169dba518177 100644
--- a/android_webview/browser/shared_renderer_state.h
+++ b/android_webview/browser/shared_renderer_state.h
@@ -55,6 +55,12 @@ class SharedRendererState {
// This function can be called on both UI and RT thread.
content::SynchronousCompositor* GetCompositor();
+
+ void SetMemoryPolicy(const content::SynchronousCompositorMemoryPolicy policy);
+ content::SynchronousCompositorMemoryPolicy GetMemoryPolicy() const;
+
+ void SetMemoryPolicyDirty(bool is_dirty);
+ bool IsMemoryPolicyDirty() const;
void SetDrawGLInput(const DrawGLInput& input);
DrawGLInput GetDrawGLInput() const;
@@ -78,6 +84,10 @@ class SharedRendererState {
// Accessed by both UI and RT thread.
mutable base::Lock lock_;
content::SynchronousCompositor* compositor_;
+ content::SynchronousCompositorMemoryPolicy memory_policy_;
+ // Set to true when SetMemoryPolicy called with a different memory policy.
+ // Set to false when memory policy is read and enforced to compositor.
+ bool memory_policy_dirty_;
DrawGLInput draw_gl_input_;
std::queue<base::Closure> closure_queue_;
bool hardware_initialized_;
« no previous file with comments | « android_webview/browser/hardware_renderer.cc ('k') | android_webview/browser/shared_renderer_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698