summaryrefslogtreecommitdiffstats
path: root/cc/trees/layer_tree_host_unittest_damage.cc
diff options
context:
space:
mode:
authorenne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-30 07:17:50 +0000
committerenne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-30 07:17:50 +0000
commit3519b87a40f8f49c270869f2c2df6e1ec4ada8da (patch)
treeefcdc25e20f68e6b60836659be002846d2599c8c /cc/trees/layer_tree_host_unittest_damage.cc
parent798a1b069246a628ed772a60598d5f2ad4a13ce9 (diff)
downloadchromium_src-3519b87a40f8f49c270869f2c2df6e1ec4ada8da.zip
chromium_src-3519b87a40f8f49c270869f2c2df6e1ec4ada8da.tar.gz
chromium_src-3519b87a40f8f49c270869f2c2df6e1ec4ada8da.tar.bz2
cc: Allow the main thread to cancel commits
Add a new SetNeedsUpdateLayers that triggers the commit flow, but is abortable if update layers doesn't actually make any changes. This allows the main thread to abort a begin frame. This happens in the case of scroll updates from the compositor thread or invalidations. There was previously an abort begin frame call for when a visibility message and a begin frame message were posted simultaneously, but it incorrectly applied the scrolls and scales without informing the compositor thread that these had already been consumed. To fix this, the abort message passes back a boolean about whether or not the commit was aborted (and needed to be sent again) or was handled (and the scrolls and scales processed). To avoid a deluge of begin frames (in the commit sense) from the scheduler, the scheduler has been adjusted to wait until the next begin frame (in the vsync signal sense) so that these calls can be throttled. Otherwise, the scheduler will just keep trying to begin frame. R=brianderson@chromium.org, danakj@chromium.org BUG=256381 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=213338 Review URL: https://chromiumcodereview.appspot.com/19106007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214314 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/trees/layer_tree_host_unittest_damage.cc')
-rw-r--r--cc/trees/layer_tree_host_unittest_damage.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/cc/trees/layer_tree_host_unittest_damage.cc b/cc/trees/layer_tree_host_unittest_damage.cc
index 523eecd..e8ae7a2 100644
--- a/cc/trees/layer_tree_host_unittest_damage.cc
+++ b/cc/trees/layer_tree_host_unittest_damage.cc
@@ -87,6 +87,7 @@ class LayerTreeHostDamageTestNoDamageDoesNotSwap
case 3:
// Cause non-visible damage.
content_->SetNeedsDisplayRect(gfx::Rect(1990, 1990, 10, 10));
+ layer_tree_host()->SetNeedsCommit();
break;
}
}