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

Unified Diff: content/browser/android/synchronous_compositor_browser_filter.h

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 | « no previous file | content/browser/android/synchronous_compositor_browser_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/synchronous_compositor_browser_filter.h
diff --git a/content/browser/android/synchronous_compositor_browser_filter.h b/content/browser/android/synchronous_compositor_browser_filter.h
index 097ff7268a6e24240e1f43f71dde13ac9f369b6f..bd40f5e053190587fdfdf6078233cc49bc486f57 100644
--- a/content/browser/android/synchronous_compositor_browser_filter.h
+++ b/content/browser/android/synchronous_compositor_browser_filter.h
@@ -11,6 +11,7 @@
#include "base/macros.h"
#include "base/synchronization/lock.h"
+#include "cc/output/compositor_frame_metadata.h"
#include "content/public/browser/android/synchronous_compositor.h"
#include "content/public/browser/browser_message_filter.h"
#include "ui/android/window_android_observer.h"
@@ -47,6 +48,10 @@ class SynchronousCompositorBrowserFilter : public ui::WindowAndroidObserver,
void SyncStateAfterVSync(ui::WindowAndroid* window_android,
SynchronousCompositorHost* compositor_host);
+
+ // Calls from SynchronousCompositorHost.
+ void RegisterHost(SynchronousCompositorHost* host);
+ void UnregisterHost(SynchronousCompositorHost* host);
void SetFrameFuture(
int routing_id,
scoped_refptr<SynchronousCompositor::FrameFuture> frame_future);
@@ -55,6 +60,8 @@ class SynchronousCompositorBrowserFilter : public ui::WindowAndroidObserver,
~SynchronousCompositorBrowserFilter() override;
bool ReceiveFrame(const IPC::Message& message);
+ void ProcessFrameMetadataOnUIThread(int routing_id,
+ cc::CompositorFrameMetadata metadata);
void SignalAllFutures();
RenderProcessHost* const render_process_host_;
@@ -64,6 +71,10 @@ class SynchronousCompositorBrowserFilter : public ui::WindowAndroidObserver,
std::vector<SynchronousCompositorHost*>
compositor_host_pending_renderer_state_;
+ // Only accessed on the UI thread. Note this is not a parallel map to
+ // |future_map_|.
+ std::map<int, SynchronousCompositorHost*> hosts_;
+
base::Lock future_map_lock_; // Protects fields below.
bool filter_ready_ = false;
using FrameFutureQueue =
« no previous file with comments | « no previous file | content/browser/android/synchronous_compositor_browser_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698