Index: android_webview/browser/hardware_renderer.h |
diff --git a/android_webview/browser/hardware_renderer.h b/android_webview/browser/hardware_renderer.h |
index 4f226d2890896b9e0ed32c477935a3efa89b2c6e..24260c6dc13c2aca9c2cd48a0a8e42a72043bac3 100644 |
--- a/android_webview/browser/hardware_renderer.h |
+++ b/android_webview/browser/hardware_renderer.h |
@@ -8,6 +8,7 @@ |
#include <queue> |
#include "android_webview/browser/gl_view_renderer_manager.h" |
+#include "android_webview/browser/global_tile_manager.h" |
#include "android_webview/browser/shared_renderer_state.h" |
#include "base/memory/ref_counted.h" |
#include "content/public/browser/android/synchronous_compositor.h" |
@@ -33,11 +34,16 @@ class HardwareRenderer { |
bool DrawGL(AwDrawGLInfo* draw_info, DrawGLResult* result); |
bool TrimMemory(int level, bool visible); |
+ size_t ForceDropTiles(); |
+ |
+ // If the hardware renderer gets hungry for more than kStarvedTimes in a row, |
+ // it becomes starved. |
+ bool IsStarved(); |
+ |
private: |
friend class internal::DeferredGpuCommandService; |
void SetMemoryPolicy(content::SynchronousCompositorMemoryPolicy& new_policy); |
- |
SharedRendererState* shared_renderer_state_; |
typedef void* EGLContext; |
@@ -46,7 +52,12 @@ class HardwareRenderer { |
scoped_refptr<AwGLSurface> gl_surface_; |
content::SynchronousCompositorMemoryPolicy memory_policy_; |
- GLViewRendererManager::Key manager_key_; |
+ GLViewRendererManager::Key renderer_manager_key_; |
+ GlobalTileManager::Key tile_manager_key_; |
+ |
+ // Number of times the hardware renderer gets the tile allocation less than |
+ // kGrallocHungryLimit |
+ size_t num_hungry_; |
DISALLOW_COPY_AND_ASSIGN(HardwareRenderer); |
}; |