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 #ifndef ANDROID_WEBVIEW_BROWSER_RENDER_THREAD_MANAGER_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_RENDER_THREAD_MANAGER_H_ |
| 6 #define ANDROID_WEBVIEW_BROWSER_RENDER_THREAD_MANAGER_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_RENDER_THREAD_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "android_webview/browser/compositor_frame_consumer.h" | 10 #include "android_webview/browser/compositor_frame_consumer.h" |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 41 ~RenderThreadManager() override; | 41 ~RenderThreadManager() override; |
| 42 | 42 |
| 43 // This function can be called from any thread. | 43 // This function can be called from any thread. |
| 44 void ClientRequestInvokeGL(bool for_idle); | 44 void ClientRequestInvokeGL(bool for_idle); |
| 45 | 45 |
| 46 // CompositorFrameConsumer methods. | 46 // CompositorFrameConsumer methods. |
| 47 void SetCompositorFrameProducer( | 47 void SetCompositorFrameProducer( |
| 48 CompositorFrameProducer* compositor_frame_producer) override; | 48 CompositorFrameProducer* compositor_frame_producer) override; |
| 49 void SetScrollOffsetOnUI(gfx::Vector2d scroll_offset) override; | 49 void SetScrollOffsetOnUI(gfx::Vector2d scroll_offset) override; |
| 50 void SetFrameOnUI(std::unique_ptr<ChildFrame> frame) override; | 50 void SetFrameOnUI(std::unique_ptr<ChildFrame> frame) override; |
| 51 void SetFrameFutureOnUI( | |
|
boliu
2016/09/22 23:05:32
I think you can just merge this with SetFrameOnUI.
ojars
2016/09/28 00:17:59
Done.
| |
| 52 const scoped_refptr<content::SynchronousCompositor::FrameFuture>& | |
| 53 frame_future) override; | |
| 51 void InitializeHardwareDrawIfNeededOnUI() override; | 54 void InitializeHardwareDrawIfNeededOnUI() override; |
| 52 ParentCompositorDrawConstraints GetParentDrawConstraintsOnUI() const override; | 55 ParentCompositorDrawConstraints GetParentDrawConstraintsOnUI() const override; |
| 53 void SwapReturnedResourcesOnUI( | 56 void SwapReturnedResourcesOnUI( |
| 54 ReturnedResourcesMap* returned_resource_map) override; | 57 ReturnedResourcesMap* returned_resource_map) override; |
| 55 bool ReturnedResourcesEmptyOnUI() const override; | 58 bool ReturnedResourcesEmptyOnUI() const override; |
| 56 std::unique_ptr<ChildFrame> PassUncommittedFrameOnUI() override; | 59 std::unique_ptr<ChildFrame> PassUncommittedFrameOnUI() override; |
| 57 bool HasFrameOnUI() const override; | 60 bool HasFrameOnUI() const override; |
| 58 void DeleteHardwareRendererOnUI() override; | 61 void DeleteHardwareRendererOnUI() override; |
| 59 | 62 |
| 60 // RT thread methods. | 63 // RT thread methods. |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 101 std::unique_ptr<HardwareRenderer> hardware_renderer_; | 104 std::unique_ptr<HardwareRenderer> hardware_renderer_; |
| 102 | 105 |
| 103 // This is accessed by both UI and RT now. TODO(hush): move to RT only. | 106 // This is accessed by both UI and RT now. TODO(hush): move to RT only. |
| 104 GLViewRendererManager::Key renderer_manager_key_; | 107 GLViewRendererManager::Key renderer_manager_key_; |
| 105 | 108 |
| 106 // Accessed by both UI and RT thread. | 109 // Accessed by both UI and RT thread. |
| 107 mutable base::Lock lock_; | 110 mutable base::Lock lock_; |
| 108 bool hardware_renderer_has_frame_; | 111 bool hardware_renderer_has_frame_; |
| 109 gfx::Vector2d scroll_offset_; | 112 gfx::Vector2d scroll_offset_; |
| 110 std::unique_ptr<ChildFrame> child_frame_; | 113 std::unique_ptr<ChildFrame> child_frame_; |
| 114 const bool async_on_draw_hardware_; | |
| 115 scoped_refptr<content::SynchronousCompositor::FrameFuture> frame_future_; | |
| 111 bool inside_hardware_release_; | 116 bool inside_hardware_release_; |
| 112 ParentCompositorDrawConstraints parent_draw_constraints_; | 117 ParentCompositorDrawConstraints parent_draw_constraints_; |
| 113 ReturnedResourcesMap returned_resources_map_; | 118 ReturnedResourcesMap returned_resources_map_; |
| 114 base::Closure request_draw_gl_closure_; | 119 base::Closure request_draw_gl_closure_; |
| 115 | 120 |
| 116 base::WeakPtrFactory<RenderThreadManager> weak_factory_on_ui_thread_; | 121 base::WeakPtrFactory<RenderThreadManager> weak_factory_on_ui_thread_; |
| 117 | 122 |
| 118 DISALLOW_COPY_AND_ASSIGN(RenderThreadManager); | 123 DISALLOW_COPY_AND_ASSIGN(RenderThreadManager); |
| 119 }; | 124 }; |
| 120 | 125 |
| 121 } // namespace android_webview | 126 } // namespace android_webview |
| 122 | 127 |
| 123 #endif // ANDROID_WEBVIEW_BROWSER_RENDER_THREAD_MANAGER_H_ | 128 #endif // ANDROID_WEBVIEW_BROWSER_RENDER_THREAD_MANAGER_H_ |
| OLD | NEW |