diff options
author | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-07 00:32:12 +0000 |
---|---|---|
committer | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-07 00:32:12 +0000 |
commit | 8ea875bbca1aebac8c6fcb56344139e496d608b9 (patch) | |
tree | 8bbd185de1f6593692f252f9220d0ed4016dffce /cc/trees/layer_tree_host_unittest_animation.cc | |
parent | 446e37e64cfdd7f8858d1a2b9cb73cfb0c969d5f (diff) | |
download | chromium_src-8ea875bbca1aebac8c6fcb56344139e496d608b9.zip chromium_src-8ea875bbca1aebac8c6fcb56344139e496d608b9.tar.gz chromium_src-8ea875bbca1aebac8c6fcb56344139e496d608b9.tar.bz2 |
cc: Fix aborted commits with evicted textures
If the prioritized resource manager evicts textures in response to a
SetMemory call but the main thread doesn't have any resources to update,
then the active tree will be stuck in a state where it is not be able to
draw. This is because ContentsTexturesPurged() is true leading to
CanDraw() being false. This causes the active tree to be "stuck" until
a non-aborted commit occurs.
There are two logic fixes here, both of which fix this bug
independently.
The first is that the prioritized resource manager reports that it has
evicted textures when it actually hasn't. This is why the main thread
can abort; it doesn't see any evicted textures and so has no work to do.
The second is a catch-all fix to just reset the contents textures purged
flag when a commit is aborted. Even if there are evicted textures, if
the main thread doesn't have anything to update, then there's no reason
to prevent drawing.
R=danakj@chromium.org
BUG=268290
Review URL: https://chromiumcodereview.appspot.com/22469002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@216047 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/trees/layer_tree_host_unittest_animation.cc')
-rw-r--r-- | cc/trees/layer_tree_host_unittest_animation.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cc/trees/layer_tree_host_unittest_animation.cc b/cc/trees/layer_tree_host_unittest_animation.cc index 703ad75..dbc4275 100644 --- a/cc/trees/layer_tree_host_unittest_animation.cc +++ b/cc/trees/layer_tree_host_unittest_animation.cc @@ -270,6 +270,8 @@ class LayerTreeHostAnimationTestTickAnimationWhileBackgrounded virtual void WillAnimateLayers( LayerTreeHostImpl* host_impl, base::TimeTicks monotonic_time) OVERRIDE { + // Verify that the host can draw, it's just not visible. + EXPECT_TRUE(host_impl->CanDraw()); if (num_animates_ < 2) { if (!num_animates_) { // We have a long animation running. It should continue to tick even |