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 a7ec60ca55163dce2059113c70a1d1b37e5297e6..febba24dc308501d55a6b5e321f6e4b70fb79824 100644 |
--- a/android_webview/browser/shared_renderer_state.h |
+++ b/android_webview/browser/shared_renderer_state.h |
@@ -51,6 +51,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; |
@@ -65,6 +71,10 @@ class SharedRendererState { |
// Accessed by both UI and RT thread. |
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_; |
}; |