Chromium Code Reviews| Index: cc/trees/single_thread_proxy.cc |
| diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc |
| index 7d5689f1ddb87903474126621bfcd6c1dd71f40d..66522eaa0c4df55bd6732e83eb08f33ac37fd270 100644 |
| --- a/cc/trees/single_thread_proxy.cc |
| +++ b/cc/trees/single_thread_proxy.cc |
| @@ -82,6 +82,12 @@ bool SingleThreadProxy::IsStarted() const { |
| return layer_tree_host_impl_; |
| } |
| +bool SingleThreadProxy::CommitToActiveTree() const { |
| + // With SingleThreadProxy we skip the pending tree and commit directly to the |
| + // active tree. |
| + return false; |
|
enne (OOO)
2015/01/28 01:14:53
...false?!
danakj
2015/01/28 01:28:20
Oh thats why my unittests started passing. thanks
|
| +} |
| + |
| void SingleThreadProxy::SetLayerTreeHostClientReady() { |
| TRACE_EVENT0("cc", "SingleThreadProxy::SetLayerTreeHostClientReady"); |
| // Scheduling is controlled by the embedder in the single thread case, so |
| @@ -250,9 +256,8 @@ void SingleThreadProxy::DoCommit() { |
| } |
| if (layer_tree_host_->settings().impl_side_painting) { |
| - // TODO(enne): just commit directly to the active tree. |
| - // |
| - // Synchronously activate during commit to satisfy any potential |
| + // Commit goes directly to the active tree, but we need to synchronously |
| + // "activate" the tree still during commit to satisfy any potential |
| // SetNextCommitWaitsForActivation calls. Unfortunately, the tree |
| // might not be ready to draw, so DidActivateSyncTree must set |
| // the flag to force the tree to not draw until textures are ready. |
| @@ -433,8 +438,8 @@ void SingleThreadProxy::DidActivateSyncTree() { |
| // Non-impl-side painting finishes commit in DoCommit. Impl-side painting |
| // defers until here to simulate SetNextCommitWaitsForActivation. |
| if (layer_tree_host_impl_->settings().impl_side_painting) { |
| - // This is required because NotifyReadyToActivate gets called when |
| - // the pending tree is not actually ready in the SingleThreadProxy. |
| + // This is required because NotifyReadyToActivate gets called immediately |
| + // after commit since single thread commits directly to the active tree. |
| layer_tree_host_impl_->SetRequiresHighResToDraw(); |
| CommitComplete(); |