diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-30 06:29:27 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-30 06:29:27 +0000 |
commit | 74b43cce8bf2f7d13fc1576d96088d2ac584e69d (patch) | |
tree | 0d86665c1f56e21696e862189e500d4fb2cc828c /cc/layers/tiled_layer.cc | |
parent | aaa60babeabcbb8d4b3ba0e587a85398b5fbd099 (diff) | |
download | chromium_src-74b43cce8bf2f7d13fc1576d96088d2ac584e69d.zip chromium_src-74b43cce8bf2f7d13fc1576d96088d2ac584e69d.tar.gz chromium_src-74b43cce8bf2f7d13fc1576d96088d2ac584e69d.tar.bz2 |
cc: Block commit on activate by setting a flag on LayerTreeHost.
Currently the ThreadProxy recursively asks all layers in the tree if
they should block the commit. This is problematic as when you remove
a layer from a the tree, it may want to block the commit to get back
resources from its active-tree impl-layer.
Instead, have layers call SetNextCommitWaitsForActivation() when they
want the next commit to block on activate. This way we only block
commits that matter, not every commit when there's a texture layer
present. And we can allow a layer to block the commit when it is
leaving the tree.
Tests:
TextureLayerNoMailboxIsActivatedDuringCommit
TextureLayerMailboxIsActivatedDuringCommit
DelegatedFrameIsActivatedDuringCommit
R=enne, piman
BUG=277953
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=220418
Review URL: https://chromiumcodereview.appspot.com/23530003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220515 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layers/tiled_layer.cc')
-rw-r--r-- | cc/layers/tiled_layer.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cc/layers/tiled_layer.cc b/cc/layers/tiled_layer.cc index 556b8231..2d812e8 100644 --- a/cc/layers/tiled_layer.cc +++ b/cc/layers/tiled_layer.cc @@ -235,8 +235,6 @@ void TiledLayer::PushPropertiesTo(LayerImpl* layer) { needs_push_properties_ = true; } -bool TiledLayer::BlocksPendingCommit() const { return true; } - PrioritizedResourceManager* TiledLayer::ResourceManager() { if (!layer_tree_host()) return NULL; @@ -731,6 +729,10 @@ bool TiledLayer::Update(ResourceUpdateQueue* queue, const OcclusionTracker* occlusion) { DCHECK(!skips_draw_ && !failed_update_); // Did ResetUpdateState get skipped? + // Tiled layer always causes commits to wait for activation, as it does + // not support pending trees. + SetNextCommitWaitsForActivation(); + bool updated = false; { |