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

Unified Diff: content/browser/android/synchronous_compositor_host.cc

Issue 2347563003: Added FrameFuture class (Closed)
Patch Set: Code review Created 4 years, 3 months 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
Index: content/browser/android/synchronous_compositor_host.cc
diff --git a/content/browser/android/synchronous_compositor_host.cc b/content/browser/android/synchronous_compositor_host.cc
index f63373c5dd72ef1d7806b5850335a9bd234f166a..19127cf328a34587f6cf2a0583b9ec8fb16c9ea5 100644
--- a/content/browser/android/synchronous_compositor_host.cc
+++ b/content/browser/android/synchronous_compositor_host.cc
@@ -138,8 +138,18 @@ bool SynchronousCompositorHost::DemandDrawHwReceiveFrame(
return false;
uint32_t compositor_frame_sink_id = std::get<0>(param);
cc::CompositorFrame compositor_frame = std::move(std::get<1>(param));
- client_->OnDrawHardwareProcessFrame(ProcessHardwareFrame(
- compositor_frame_sink_id, std::move(compositor_frame)));
+ scoped_refptr<SynchronousCompositor::FrameFuture> frame_future =
+ new FrameFuture();
+ SynchronousCompositor::Frame frame = ProcessHardwareFrame(
+ compositor_frame_sink_id, std::move(compositor_frame));
+ if (!frame.frame)
+ return true;
+ std::unique_ptr<SynchronousCompositor::Frame> frame_ptr =
+ base::MakeUnique<SynchronousCompositor::Frame>();
+ frame_ptr->frame = std::move(frame.frame);
+ frame_ptr->compositor_frame_sink_id = frame.compositor_frame_sink_id;
+ frame_future->setFrame(std::move(frame_ptr));
+ client_->OnDrawHardwareProcessFrameFuture(std::move(frame_future));
return true;
}
« no previous file with comments | « content/browser/android/synchronous_compositor_host.h ('k') | content/public/browser/android/synchronous_compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698