diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-24 00:21:16 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-24 00:21:16 +0000 |
commit | 3698e799a8dd0d4e38d1d8a9c54275112f2b255c (patch) | |
tree | 31e4f323367dd0e5cd24aee8c00a4a0f52bad29b /cc | |
parent | 4e2dbacede730cc9c9efddca37fae81131425804 (diff) | |
download | chromium_src-3698e799a8dd0d4e38d1d8a9c54275112f2b255c.zip chromium_src-3698e799a8dd0d4e38d1d8a9c54275112f2b255c.tar.gz chromium_src-3698e799a8dd0d4e38d1d8a9c54275112f2b255c.tar.bz2 |
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
Diffstat (limited to 'cc')
-rw-r--r-- | cc/layers/layer.h | 3 | ||||
-rw-r--r-- | cc/layers/tiled_layer.cc | 2 | ||||
-rw-r--r-- | cc/layers/tiled_layer.h | 2 | ||||
-rw-r--r-- | cc/test/tiled_layer_test_common.cc | 2 | ||||
-rw-r--r-- | cc/test/tiled_layer_test_common.h | 2 |
5 files changed, 6 insertions, 5 deletions
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<Layer>, 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_; } |