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

Unified Diff: cc/trees/proxy_impl.cc

Issue 2158973002: cc: Clean up LayerTreeTest and TestHooks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: proxy-impls: android-build Created 4 years, 5 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: cc/trees/proxy_impl.cc
diff --git a/cc/trees/proxy_impl.cc b/cc/trees/proxy_impl.cc
index cf0dd57bb0b10839f4ab37f704fba30c04ee407e..1dbf386b75cdeee69c86ba408075633ef685f5aa 100644
--- a/cc/trees/proxy_impl.cc
+++ b/cc/trees/proxy_impl.cc
@@ -36,16 +36,6 @@ unsigned int nextBeginFrameId = 0;
} // namespace
-std::unique_ptr<ProxyImpl> ProxyImpl::Create(
- ChannelImpl* channel_impl,
- LayerTreeHost* layer_tree_host,
- TaskRunnerProvider* task_runner_provider,
- std::unique_ptr<BeginFrameSource> external_begin_frame_source) {
- return base::WrapUnique(
- new ProxyImpl(channel_impl, layer_tree_host, task_runner_provider,
- std::move(external_begin_frame_source)));
-}
-
ProxyImpl::ProxyImpl(
ChannelImpl* channel_impl,
LayerTreeHost* layer_tree_host,
@@ -72,6 +62,10 @@ ProxyImpl::ProxyImpl(
DCHECK(IsImplThread());
DCHECK(IsMainThreadBlocked());
+ // Double checking we set this correctly since double->int truncations are
+ // silent and have been done mistakenly: crbug.com/568120.
+ DCHECK(!smoothness_priority_expiration_notifier_.delay().is_zero());
+
layer_tree_host_impl_ = layer_tree_host->CreateLayerTreeHostImpl(this);
SchedulerSettings scheduler_settings(
@@ -256,16 +250,6 @@ void ProxyImpl::MainFrameWillHappenOnImplForTesting(
completion->Signal();
}
-void ProxyImpl::BlockNotifyReadyToActivateForTesting(bool block) {
- DCHECK(IsImplThread());
- layer_tree_host_impl_->BlockNotifyReadyToActivateForTesting(block);
-}
-
-CompletionEvent* ProxyImpl::ActivationCompletionEventForTesting() {
- DCHECK(IsImplThread());
- return activation_completion_event_;
-}
-
void ProxyImpl::StartCommitOnImpl(CompletionEvent* completion,
LayerTreeHost* layer_tree_host,
base::TimeTicks main_thread_start_time,
@@ -287,6 +271,8 @@ void ProxyImpl::StartCommitOnImpl(CompletionEvent* completion,
// But, we can avoid a PostTask in here.
scheduler_->NotifyBeginMainFrameStarted(main_thread_start_time);
+ layer_tree_host_impl_->BeginMainFrameCompleted();
enne (OOO) 2016/07/18 21:48:02 Just from a readability perspective, it's a little
danakj 2016/07/18 23:20:10 It needs to happen before NotifyReadyToCommit and
enne (OOO) 2016/07/19 01:08:59 DidStartCommitOnImpl?
danakj 2016/07/19 01:36:37 I mean, should I rename the method on ProxyImpl to
+
commit_completion_event_ = completion;
commit_completion_waits_for_activation_ = hold_commit_for_activation;

Powered by Google App Engine
This is Rietveld 408576698