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

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: comment Created 4 years, 7 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 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

Powered by Google App Engine
This is Rietveld 408576698