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

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

Issue 2456523004: sync compositor: Implement post metadata to UI (Closed)
Patch Set: rebase Created 4 years, 2 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
« no previous file with comments | « content/browser/android/synchronous_compositor_host.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 01a92ff56c393e21f5760b007598f4265d8584f1..2b588aed0b0f2186c0579d280b63ef64ad1ac6da 100644
--- a/content/browser/android/synchronous_compositor_host.cc
+++ b/content/browser/android/synchronous_compositor_host.cc
@@ -82,6 +82,10 @@ SynchronousCompositorHost::SynchronousCompositorHost(
SynchronousCompositorHost::~SynchronousCompositorHost() {
client_->DidDestroyCompositor(this, process_id_, routing_id_);
+ if (registered_with_filter_) {
+ if (SynchronousCompositorBrowserFilter* filter = GetFilter())
+ filter->UnregisterHost(this);
+ }
}
bool SynchronousCompositorHost::OnMessageReceived(const IPC::Message& message) {
@@ -105,6 +109,10 @@ SynchronousCompositorHost::DemandDrawHwAsync(
transform_for_tile_priority);
scoped_refptr<FrameFuture> frame_future = new FrameFuture();
if (SynchronousCompositorBrowserFilter* filter = GetFilter()) {
+ if (!registered_with_filter_) {
+ filter->RegisterHost(this);
+ registered_with_filter_ = true;
+ }
filter->SetFrameFuture(routing_id_, frame_future);
sender_->Send(new SyncCompositorMsg_DemandDrawHwAsync(routing_id_, params));
} else {
@@ -135,17 +143,10 @@ SynchronousCompositor::Frame SynchronousCompositorHost::DemandDrawHw(
if (!compositor_frame)
return SynchronousCompositor::Frame();
- return ProcessHardwareFrame(compositor_frame_sink_id,
- std::move(*compositor_frame));
-}
-
-SynchronousCompositor::Frame SynchronousCompositorHost::ProcessHardwareFrame(
- uint32_t compositor_frame_sink_id,
- cc::CompositorFrame compositor_frame) {
SynchronousCompositor::Frame frame;
frame.frame.reset(new cc::CompositorFrame);
frame.compositor_frame_sink_id = compositor_frame_sink_id;
- *frame.frame = std::move(compositor_frame);
+ *frame.frame = std::move(*compositor_frame);
UpdateFrameMetaData(frame.frame->metadata.Clone());
return frame;
}
« no previous file with comments | « content/browser/android/synchronous_compositor_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698