summaryrefslogtreecommitdiffstats
path: root/cc/layers/texture_layer_unittest.cc
diff options
context:
space:
mode:
authorenne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-03 15:25:46 +0000
committerenne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-03 15:25:46 +0000
commit9f35bd24fc4baa5401e58c4006de6b33403acdcf (patch)
tree7bdad6a99c9ce95ca552edfea9b08c2f54a2fd50 /cc/layers/texture_layer_unittest.cc
parent9a397992eaf868e1f2a12d459910d12256ba2089 (diff)
downloadchromium_src-9f35bd24fc4baa5401e58c4006de6b33403acdcf.zip
chromium_src-9f35bd24fc4baa5401e58c4006de6b33403acdcf.tar.gz
chromium_src-9f35bd24fc4baa5401e58c4006de6b33403acdcf.tar.bz2
Update source frame number even when commits abort
If a commit aborts, then PictureLayer::update_source_frame_number_ will be stale since only a finished commit would update the LTH::source_frame_number_. This could lead to an issue where a commit aborts and then on the next frame a layer's size is updated *and* it is set to not draw. This causes it to skip being updated (meaning the pile size is not updated) but the layer bounds have changed and trips an assert in PushPropertiesTo that tries to make sure that the pile and layer bounds are the same when a layer has been updated that frame. The fix here is to update the source frame number even for aborted commits. This causes the PushPropertiesTo assert to properly be ignored. BUG=375675 Review URL: https://codereview.chromium.org/307653005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274540 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layers/texture_layer_unittest.cc')
-rw-r--r--cc/layers/texture_layer_unittest.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/cc/layers/texture_layer_unittest.cc b/cc/layers/texture_layer_unittest.cc
index be420a5..c4019c1 100644
--- a/cc/layers/texture_layer_unittest.cc
+++ b/cc/layers/texture_layer_unittest.cc
@@ -1107,6 +1107,7 @@ class TextureLayerNoExtraCommitForMailboxTest
scoped_ptr<SingleReleaseCallback>* release_callback,
bool use_shared_memory) OVERRIDE {
if (layer_tree_host()->source_frame_number() == 1) {
+ // Once this has been committed, the mailbox will be released.
*texture_mailbox = TextureMailbox();
return true;
}
@@ -1119,7 +1120,9 @@ class TextureLayerNoExtraCommitForMailboxTest
}
void MailboxReleased(uint32 sync_point, bool lost_resource) {
- EXPECT_EQ(2, layer_tree_host()->source_frame_number());
+ // Source frame number during callback is the same as the source frame
+ // on which it was released.
+ EXPECT_EQ(1, layer_tree_host()->source_frame_number());
EndTest();
}