OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #ifndef ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ |
6 #define ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ |
7 | 7 |
8 #include "android_webview/browser/global_tile_manager.h" | 8 #include "android_webview/browser/global_tile_manager.h" |
9 #include "android_webview/browser/global_tile_manager_client.h" | 9 #include "android_webview/browser/global_tile_manager_client.h" |
10 #include "android_webview/browser/shared_renderer_state.h" | 10 #include "android_webview/browser/shared_renderer_state.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 void SetDipScale(float dip_scale); | 99 void SetDipScale(float dip_scale); |
100 | 100 |
101 // Set the root layer scroll offset to |new_value|. | 101 // Set the root layer scroll offset to |new_value|. |
102 void ScrollTo(gfx::Vector2d new_value); | 102 void ScrollTo(gfx::Vector2d new_value); |
103 | 103 |
104 // Android views hierarchy gluing. | 104 // Android views hierarchy gluing. |
105 bool IsVisible() const; | 105 bool IsVisible() const; |
106 gfx::Rect GetScreenRect() const; | 106 gfx::Rect GetScreenRect() const; |
107 bool attached_to_window() const { return attached_to_window_; } | 107 bool attached_to_window() const { return attached_to_window_; } |
108 bool hardware_enabled() const { return hardware_enabled_; } | 108 bool hardware_enabled() const { return hardware_enabled_; } |
| 109 void ReleaseHardware(); |
109 | 110 |
110 // Set the memory policy in shared renderer state and request the tiles from | 111 // Set the memory policy in shared renderer state and request the tiles from |
111 // GlobalTileManager. The actually amount of memory allowed by | 112 // GlobalTileManager. The actually amount of memory allowed by |
112 // GlobalTileManager may not be equal to what's requested in |policy|. | 113 // GlobalTileManager may not be equal to what's requested in |policy|. |
113 void RequestMemoryPolicy(content::SynchronousCompositorMemoryPolicy& policy); | 114 void RequestMemoryPolicy(content::SynchronousCompositorMemoryPolicy& policy); |
114 | 115 |
115 void TrimMemory(const int level, const bool visible); | 116 void TrimMemory(const int level, const bool visible); |
116 | 117 |
117 // SynchronousCompositorClient overrides. | 118 // SynchronousCompositorClient overrides. |
118 virtual void DidInitializeCompositor( | 119 virtual void DidInitializeCompositor( |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 // policy on the shared_renderer_state_ atomically. | 232 // policy on the shared_renderer_state_ atomically. |
232 size_t num_tiles_; | 233 size_t num_tiles_; |
233 size_t num_bytes_; | 234 size_t num_bytes_; |
234 | 235 |
235 DISALLOW_COPY_AND_ASSIGN(BrowserViewRenderer); | 236 DISALLOW_COPY_AND_ASSIGN(BrowserViewRenderer); |
236 }; | 237 }; |
237 | 238 |
238 } // namespace android_webview | 239 } // namespace android_webview |
239 | 240 |
240 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ | 241 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ |
OLD | NEW |