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

Unified Diff: cc/trees/layer_tree_host_unittest.cc

Issue 19106007: cc: Allow the main thread to cancel commits (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: New test for texture state Created 7 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
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest.cc
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index 3dbce1b32c0d3dc1c0f5fb679828d4b75c1805c4..e176ac2dec7da10f58e24a927d951968dfae9cee 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -1812,7 +1812,7 @@ class LayerTreeHostTestContinuousCommit : public LayerTreeHostTest {
virtual void DidCommit() OVERRIDE {
if (num_draw_layers_ == 2)
return;
- layer_tree_host()->root_layer()->SetNeedsDisplay();
+ layer_tree_host()->SetNeedsCommit();
}
virtual void CommitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE {
@@ -3028,6 +3028,9 @@ class LayerTreeHostTestDeferredInitialize : public LayerTreeHostTest {
virtual void SetupTree() OVERRIDE {
layer_ = FakePictureLayer::Create(&client_);
+ // Force commits to not be aborted so new frames get drawn, otherwise
+ // the renderer gets deferred initialized but nothing new needs drawing.
+ layer_->set_always_update_resources(true);
danakj 2013/07/23 15:35:27 Is this saying that when we switch to GL mode, the
enne (OOO) 2013/07/23 16:58:21 I am not convinced of that. If you switch modes b
danakj 2013/07/23 17:00:11 I guess it depends what it means to switch modes,
boliu 2013/07/23 17:19:44 Right. The reason there's a SetNeedsCommit is mail
layer_tree_host()->SetRootLayer(layer_);
LayerTreeHostTest::SetupTree();
}
@@ -3311,9 +3314,11 @@ class LayerTreeHostTestLayersPushProperties : public LayerTreeHostTest {
++expected_push_properties_grandchild_;
break;
case 16:
+ // SetNeedsDisplay does not always set needs commit (so call it
+ // explicitly), but is a property change.
child_->SetNeedsDisplay();
- // The modified layer needs commit
++expected_push_properties_child_;
+ layer_tree_host()->SetNeedsCommit();
break;
case 17:
EndTest();
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698