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 9bde7f386e0f74d44ea472a0279c9cbc7f57e1e0..38534023dd6335d9795a0a5c8b9f8b5b0b9c7174 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)); |
@@ -187,9 +161,9 @@ void SynchronousCompositorFilter::CheckIsReady(int routing_id) { |
if (filter_ready_ && entry.IsReady()) { |
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, &input_handler_)); |
+ new SynchronousCompositorProxy(routing_id, this, |
+ entry.synchronous_input_handler_proxy, |
+ &input_handler_)); |
if (entry.output_surface) |
proxy->SetOutputSurface(entry.output_surface); |
sync_compositor_map_.add(routing_id, std::move(proxy)); |
@@ -206,8 +180,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); |
} |
} |
@@ -276,12 +249,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 |
no sievers
2016/06/03 20:35:50
nit: how/why? :)
boliu
2016/06/03 21:01:06
We don't need "Entry" anymore, since Entry is real
|
bool SynchronousCompositorFilter::Entry::IsReady() { |
- return begin_frame_source && synchronous_input_handler_proxy; |
+ return synchronous_input_handler_proxy; |
} |
} // namespace content |