summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authorepenner@chromium.org <epenner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-29 13:32:24 +0000
committerepenner@chromium.org <epenner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-29 13:32:24 +0000
commit666dd56327e74d06023931b9ad0973b4de266a36 (patch)
tree684518d1065e624137a02a0bbf7a2225c7f6148a /cc
parent8e665003f6dddf2bf6d2048a3a2c6cca454a0560 (diff)
downloadchromium_src-666dd56327e74d06023931b9ad0973b4de266a36.zip
chromium_src-666dd56327e74d06023931b9ad0973b4de266a36.tar.gz
chromium_src-666dd56327e74d06023931b9ad0973b4de266a36.tar.bz2
CC: Force uploads even if animations are present.
This is the nasty 'middle ground' case. If we don't force uploads we will get smoother animations, but it will be at the expense of very bad main-thread performance. BUG=251990 Review URL: https://chromiumcodereview.appspot.com/17157014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209296 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r--cc/resources/tile_manager.cc2
-rw-r--r--cc/resources/tile_manager.h2
-rw-r--r--cc/test/fake_tile_manager_client.cc5
-rw-r--r--cc/test/fake_tile_manager_client.h2
-rw-r--r--cc/trees/layer_tree_host_impl.cc12
-rw-r--r--cc/trees/layer_tree_host_impl.h2
6 files changed, 1 insertions, 24 deletions
diff --git a/cc/resources/tile_manager.cc b/cc/resources/tile_manager.cc
index 6c41a30..5a0338c 100644
--- a/cc/resources/tile_manager.cc
+++ b/cc/resources/tile_manager.cc
@@ -177,7 +177,7 @@ void TileManager::UnregisterTile(Tile* tile) {
}
bool TileManager::ShouldForceTasksRequiredForActivationToComplete() const {
- return client_->ShouldForceTileUploadsRequiredForActivationToComplete();
+ return GlobalState().tree_priority != SMOOTHNESS_TAKES_PRIORITY;
}
class BinComparator {
diff --git a/cc/resources/tile_manager.h b/cc/resources/tile_manager.h
index ef8ccfb..01acf6e 100644
--- a/cc/resources/tile_manager.h
+++ b/cc/resources/tile_manager.h
@@ -27,8 +27,6 @@ class TileVersion;
class CC_EXPORT TileManagerClient {
public:
virtual void DidInitializeVisibleTile() = 0;
- virtual bool
- ShouldForceTileUploadsRequiredForActivationToComplete() const = 0;
virtual void NotifyReadyToActivate() = 0;
protected:
diff --git a/cc/test/fake_tile_manager_client.cc b/cc/test/fake_tile_manager_client.cc
index 29a130d..c82aeb0 100644
--- a/cc/test/fake_tile_manager_client.cc
+++ b/cc/test/fake_tile_manager_client.cc
@@ -6,9 +6,4 @@
namespace cc {
-bool FakeTileManagerClient::
- ShouldForceTileUploadsRequiredForActivationToComplete() const {
- return false;
-}
-
} // namespace cc
diff --git a/cc/test/fake_tile_manager_client.h b/cc/test/fake_tile_manager_client.h
index 743f1b3..f18ebec2 100644
--- a/cc/test/fake_tile_manager_client.h
+++ b/cc/test/fake_tile_manager_client.h
@@ -15,8 +15,6 @@ class FakeTileManagerClient : public TileManagerClient {
// TileManagerClient implementation.
virtual void DidInitializeVisibleTile() OVERRIDE {}
- virtual bool ShouldForceTileUploadsRequiredForActivationToComplete() const
- OVERRIDE;
virtual void NotifyReadyToActivate() OVERRIDE {}
};
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index abe83b0..f03355d 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1009,18 +1009,6 @@ void LayerTreeHostImpl::DidInitializeVisibleTile() {
client_->DidInitializeVisibleTileOnImplThread();
}
-bool LayerTreeHostImpl::
- ShouldForceTileUploadsRequiredForActivationToComplete() const {
- // During shutdown of TileManager, it will attempt to flush its job queue,
- // which can call this function while this is NULL.
- if (!tile_manager_)
- return false;
-
- TreePriority tree_priority = tile_manager_->GlobalState().tree_priority;
- return tree_priority != SMOOTHNESS_TAKES_PRIORITY &&
- animation_registrar_->active_animation_controllers().empty();
-}
-
void LayerTreeHostImpl::NotifyReadyToActivate() {
if (pending_tree_)
ActivatePendingTree();
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index cf9b094..4e8fc8d 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -194,8 +194,6 @@ class CC_EXPORT LayerTreeHostImpl
// TileManagerClient implementation.
virtual void DidInitializeVisibleTile() OVERRIDE;
- virtual bool ShouldForceTileUploadsRequiredForActivationToComplete() const
- OVERRIDE;
virtual void NotifyReadyToActivate() OVERRIDE;
// OutputSurfaceClient implementation.