From 3698e799a8dd0d4e38d1d8a9c54275112f2b255c Mon Sep 17 00:00:00 2001 From: "danakj@chromium.org" Date: Sat, 24 Aug 2013 00:21:16 +0000 Subject: cc: Return const* from const getter of LayerTreeHost. R=enne, jamesr BUG= Review URL: https://chromiumcodereview.appspot.com/23392005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219389 0039d316-1c4b-4281-b951-d872f2087c98 --- cc/layers/layer.h | 3 ++- cc/layers/tiled_layer.cc | 2 +- cc/layers/tiled_layer.h | 2 +- cc/test/tiled_layer_test_common.cc | 2 +- cc/test/tiled_layer_test_common.h | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) (limited to 'cc') diff --git a/cc/layers/layer.h b/cc/layers/layer.h index 5519651..ff3ff20 100644 --- a/cc/layers/layer.h +++ b/cc/layers/layer.h @@ -354,7 +354,8 @@ class CC_EXPORT Layer : public base::RefCounted, float* contents_scale_y, gfx::Size* content_bounds); - LayerTreeHost* layer_tree_host() const { return layer_tree_host_; } + LayerTreeHost* layer_tree_host() { return layer_tree_host_; } + const LayerTreeHost* layer_tree_host() const { return layer_tree_host_; } // Set the priority of all desired textures in this layer. virtual void SetTexturePriorities(const PriorityCalculator& priority_calc) {} diff --git a/cc/layers/tiled_layer.cc b/cc/layers/tiled_layer.cc index bac12f0..556b8231 100644 --- a/cc/layers/tiled_layer.cc +++ b/cc/layers/tiled_layer.cc @@ -237,7 +237,7 @@ void TiledLayer::PushPropertiesTo(LayerImpl* layer) { bool TiledLayer::BlocksPendingCommit() const { return true; } -PrioritizedResourceManager* TiledLayer::ResourceManager() const { +PrioritizedResourceManager* TiledLayer::ResourceManager() { if (!layer_tree_host()) return NULL; return layer_tree_host()->contents_texture_manager(); diff --git a/cc/layers/tiled_layer.h b/cc/layers/tiled_layer.h index 8ad7df9..56e91f8 100644 --- a/cc/layers/tiled_layer.h +++ b/cc/layers/tiled_layer.h @@ -68,7 +68,7 @@ class CC_EXPORT TiledLayer : public ContentsScalingLayer { bool SkipsDraw() const { return skips_draw_; } // Virtual for testing - virtual PrioritizedResourceManager* ResourceManager() const; + virtual PrioritizedResourceManager* ResourceManager(); const LayerTilingData* TilerForTesting() const { return tiler_.get(); } const PrioritizedResource* ResourceAtForTesting(int i, int j) const; diff --git a/cc/test/tiled_layer_test_common.cc b/cc/test/tiled_layer_test_common.cc index 92fc9b9..79d658d 100644 --- a/cc/test/tiled_layer_test_common.cc +++ b/cc/test/tiled_layer_test_common.cc @@ -109,7 +109,7 @@ void FakeTiledLayer::SetTexturePriorities( } } -PrioritizedResourceManager* FakeTiledLayer::ResourceManager() const { +PrioritizedResourceManager* FakeTiledLayer::ResourceManager() { return resource_manager_; } diff --git a/cc/test/tiled_layer_test_common.h b/cc/test/tiled_layer_test_common.h index c793c00..ea1eb12 100644 --- a/cc/test/tiled_layer_test_common.h +++ b/cc/test/tiled_layer_test_common.h @@ -112,7 +112,7 @@ class FakeTiledLayer : public TiledLayer { virtual void SetTexturePriorities( const PriorityCalculator& priority_calculator) OVERRIDE; - virtual PrioritizedResourceManager* ResourceManager() const OVERRIDE; + virtual PrioritizedResourceManager* ResourceManager() OVERRIDE; FakeLayerUpdater* fake_layer_updater() { return fake_updater_.get(); } gfx::RectF update_rect() { return update_rect_; } -- cgit v1.1