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

Unified Diff: content/renderer/android/synchronous_compositor_filter.cc

Issue 1969263004: sync compositor: Remove begin frame source (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase onto https://codereview.chromium.org/1974133002/ Created 4 years, 6 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/renderer/android/synchronous_compositor_filter.cc
diff --git a/content/renderer/android/synchronous_compositor_filter.cc b/content/renderer/android/synchronous_compositor_filter.cc
index 75e671daef3974f9ca39020c95f199c9dc2564ca..a73fde1af966e580368bcc594f3db94330381614 100644
--- a/content/renderer/android/synchronous_compositor_filter.cc
+++ b/content/renderer/android/synchronous_compositor_filter.cc
@@ -154,32 +154,6 @@ void SynchronousCompositorFilter::UnregisterOutputSurface(
RemoveEntryIfNeeded(routing_id);
}
-void SynchronousCompositorFilter::RegisterBeginFrameSource(
- int routing_id,
- SynchronousCompositorExternalBeginFrameSource* begin_frame_source) {
- DCHECK(compositor_task_runner_->BelongsToCurrentThread());
- DCHECK(begin_frame_source);
- Entry& entry = entry_map_[routing_id];
- DCHECK(!entry.begin_frame_source);
- entry.begin_frame_source = begin_frame_source;
- CheckIsReady(routing_id);
-}
-
-void SynchronousCompositorFilter::UnregisterBeginFrameSource(
- int routing_id,
- SynchronousCompositorExternalBeginFrameSource* begin_frame_source) {
- DCHECK(compositor_task_runner_->BelongsToCurrentThread());
- DCHECK(begin_frame_source);
- DCHECK(ContainsKey(entry_map_, routing_id));
- Entry& entry = entry_map_[routing_id];
- DCHECK_EQ(begin_frame_source, entry.begin_frame_source);
-
- if (entry.IsReady())
- UnregisterObjects(routing_id);
- entry.begin_frame_source = nullptr;
- RemoveEntryIfNeeded(routing_id);
-}
-
void SynchronousCompositorFilter::CheckIsReady(int routing_id) {
DCHECK(compositor_task_runner_->BelongsToCurrentThread());
DCHECK(ContainsKey(entry_map_, routing_id));
@@ -188,7 +162,6 @@ void SynchronousCompositorFilter::CheckIsReady(int routing_id) {
DCHECK(!sync_compositor_map_.contains(routing_id));
std::unique_ptr<SynchronousCompositorProxy> proxy(
new SynchronousCompositorProxy(routing_id, this,
- entry.begin_frame_source,
entry.synchronous_input_handler_proxy));
if (entry.output_surface)
proxy->SetOutputSurface(entry.output_surface);
@@ -206,8 +179,7 @@ void SynchronousCompositorFilter::RemoveEntryIfNeeded(int routing_id) {
DCHECK(compositor_task_runner_->BelongsToCurrentThread());
DCHECK(ContainsKey(entry_map_, routing_id));
Entry& entry = entry_map_[routing_id];
- if (!entry.begin_frame_source && !entry.output_surface &&
- !entry.synchronous_input_handler_proxy) {
+ if (!entry.output_surface && !entry.synchronous_input_handler_proxy) {
entry_map_.erase(routing_id);
}
}
@@ -236,12 +208,12 @@ void SynchronousCompositorFilter::DidRemoveSynchronousHandlerProxy(
}
SynchronousCompositorFilter::Entry::Entry()
- : begin_frame_source(nullptr),
- output_surface(nullptr),
+ : output_surface(nullptr),
synchronous_input_handler_proxy(nullptr) {}
+// TODO(boliu): refactor this
bool SynchronousCompositorFilter::Entry::IsReady() {
- return begin_frame_source && synchronous_input_handler_proxy;
+ return synchronous_input_handler_proxy;
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698