Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "android_webview/browser/hardware_renderer.h" | 5 #include "android_webview/browser/hardware_renderer.h" |
| 6 | 6 |
| 7 #include "android_webview/browser/aw_gl_surface.h" | 7 #include "android_webview/browser/aw_gl_surface.h" |
| 8 #include "android_webview/browser/browser_view_renderer_client.h" | 8 #include "android_webview/browser/browser_view_renderer_client.h" |
| 9 #include "android_webview/browser/gl_view_renderer_manager.h" | 9 #include "android_webview/browser/gl_view_renderer_manager.h" |
| 10 #include "android_webview/browser/scoped_app_gl_state_restore.h" | 10 #include "android_webview/browser/scoped_app_gl_state_restore.h" |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 136 | 136 |
| 137 if (did_draw) { | 137 if (did_draw) { |
| 138 result->frame_id = input.frame_id; | 138 result->frame_id = input.frame_id; |
| 139 result->clip_contains_visible_rect = | 139 result->clip_contains_visible_rect = |
| 140 clip_rect.Contains(input.global_visible_rect); | 140 clip_rect.Contains(input.global_visible_rect); |
| 141 } | 141 } |
| 142 return did_draw; | 142 return did_draw; |
| 143 } | 143 } |
| 144 | 144 |
| 145 bool HardwareRenderer::TrimMemory(int level, bool visible) { | 145 bool HardwareRenderer::TrimMemory(int level, bool visible) { |
| 146 LOG(ERROR) << "------------------- HardwareRenderer::TrimMemory"; | |
|
hush (inactive)
2014/05/01 00:35:54
remove?
boliu
2014/05/01 00:46:36
oops, done
| |
| 146 // Constants from Android ComponentCallbacks2. | 147 // Constants from Android ComponentCallbacks2. |
| 147 enum { | 148 enum { |
| 148 TRIM_MEMORY_RUNNING_LOW = 10, | 149 TRIM_MEMORY_RUNNING_LOW = 10, |
| 149 TRIM_MEMORY_UI_HIDDEN = 20, | 150 TRIM_MEMORY_UI_HIDDEN = 20, |
| 150 TRIM_MEMORY_BACKGROUND = 40, | 151 TRIM_MEMORY_BACKGROUND = 40, |
| 151 }; | 152 }; |
| 152 | 153 |
| 153 // Not urgent enough. TRIM_MEMORY_UI_HIDDEN is treated specially because | 154 // Not urgent enough. TRIM_MEMORY_UI_HIDDEN is treated specially because |
| 154 // it does not indicate memory pressure, but merely that the app is | 155 // it does not indicate memory pressure, but merely that the app is |
| 155 // backgrounded. | 156 // backgrounded. |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 296 base::RefCountedThreadSafe<DeferredGpuCommandService>::AddRef(); | 297 base::RefCountedThreadSafe<DeferredGpuCommandService>::AddRef(); |
| 297 } | 298 } |
| 298 | 299 |
| 299 void DeferredGpuCommandService::Release() const { | 300 void DeferredGpuCommandService::Release() const { |
| 300 base::RefCountedThreadSafe<DeferredGpuCommandService>::Release(); | 301 base::RefCountedThreadSafe<DeferredGpuCommandService>::Release(); |
| 301 } | 302 } |
| 302 | 303 |
| 303 } // namespace internal | 304 } // namespace internal |
| 304 | 305 |
| 305 } // namespace android_webview | 306 } // namespace android_webview |
| OLD | NEW |