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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 12545018: Move context-related callbacks into OutputSurface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unit test Created 7 years, 8 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
« no previous file with comments | « cc/test/pixel_test.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index a500663336cfee853bb751abce136f043f9cf430..bfa05e39fa1d0f480db280aa7fe9a21f413508bc 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -990,6 +990,9 @@ void LayerTreeHostImpl::OnSendFrameToParentCompositorAck(
// TODO(piman): We may need to do some validation on this ack before
// processing it.
renderer_->ReceiveCompositorFrameAck(ack);
+
+ // When using compositor frame data, the ack doubles as a swap complete ack.
+ OnSwapBuffersComplete();
}
void LayerTreeHostImpl::OnCanDrawStateChangedForTree() {
@@ -1149,7 +1152,11 @@ const LayerTreeSettings& LayerTreeHostImpl::Settings() const {
}
void LayerTreeHostImpl::DidLoseOutputSurface() {
- client_->DidLoseOutputSurfaceOnImplThread();
+ // TODO(jamesr): The renderer_ check is needed to make some of the
+ // LayerTreeHostContextTest tests pass, but shouldn't be necessary (or
+ // important) in production. We should adjust the test to not need this.
+ if (renderer_)
+ client_->DidLoseOutputSurfaceOnImplThread();
}
void LayerTreeHostImpl::OnSwapBuffersComplete() {
« no previous file with comments | « cc/test/pixel_test.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698