Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(477)

Unified Diff: android_webview/browser/render_thread_manager.cc

Issue 2480203002: ui: Cleanup class/struct forward declarations (Closed)
Patch Set: Sync CL to position 430550 Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « android_webview/browser/render_thread_manager.h ('k') | android_webview/browser/surfaces_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/render_thread_manager.cc
diff --git a/android_webview/browser/render_thread_manager.cc b/android_webview/browser/render_thread_manager.cc
index 29ec88394202bf9709c0437c20f6856ae8586d39..0c1dbd5e92330e8609b1e978a2c3ce66105efb16 100644
--- a/android_webview/browser/render_thread_manager.cc
+++ b/android_webview/browser/render_thread_manager.cc
@@ -180,32 +180,10 @@ gfx::Vector2d RenderThreadManager::GetScrollOffsetOnRT() {
return scroll_offset_;
}
-void RenderThreadManager::SetFrameOnUI(
- std::unique_ptr<ChildFrame> frame,
- const scoped_refptr<content::SynchronousCompositor::FrameFuture>&
- frame_future) {
+void RenderThreadManager::SetFrameOnUI(std::unique_ptr<ChildFrame> frame) {
base::AutoLock lock(lock_);
DCHECK(!child_frame_.get());
child_frame_ = std::move(frame);
- frame_future_ = std::move(frame_future);
-}
-
-std::unique_ptr<ChildFrame> RenderThreadManager::GetSynchronousCompositorFrame(
- scoped_refptr<content::SynchronousCompositor::FrameFuture> frame_future,
- std::unique_ptr<ChildFrame> child_frame) {
- if (!frame_future)
- return nullptr;
- DCHECK(!child_frame->frame.get());
- std::unique_ptr<content::SynchronousCompositor::Frame> frame =
- frame_future->GetFrame();
- std::unique_ptr<cc::CompositorFrame> compositor_frame =
- std::move(frame->frame);
- return base::MakeUnique<ChildFrame>(
- frame->compositor_frame_sink_id, std::move(compositor_frame),
- child_frame->compositor_id,
- child_frame->viewport_rect_for_tile_priority_empty,
- child_frame->transform_for_tile_priority,
- child_frame->offscreen_pre_raster, child_frame->is_layer);
}
std::unique_ptr<ChildFrame> RenderThreadManager::PassFrameOnRT() {
@@ -215,18 +193,10 @@ std::unique_ptr<ChildFrame> RenderThreadManager::PassFrameOnRT() {
return std::move(child_frame_);
}
-scoped_refptr<content::SynchronousCompositor::FrameFuture>
-RenderThreadManager::PassFrameFutureOnRT() {
- base::AutoLock lock(lock_);
- return std::move(frame_future_);
-}
-
std::unique_ptr<ChildFrame> RenderThreadManager::PassUncommittedFrameOnUI() {
base::AutoLock lock(lock_);
- if (async_on_draw_hardware_ && child_frame_.get()) {
- return GetSynchronousCompositorFrame(std::move(frame_future_),
- std::move(child_frame_));
- }
+ if (child_frame_)
+ child_frame_->WaitOnFutureIfNeeded();
return std::move(child_frame_);
}
« no previous file with comments | « android_webview/browser/render_thread_manager.h ('k') | android_webview/browser/surfaces_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698