summaryrefslogtreecommitdiffstats
path: root/cc/layer.cc
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-21 04:19:52 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-21 04:19:52 +0000
commitda3a295bf286594bced1f26dfd1e0df97b28048a (patch)
tree1f0bc9f7de74e475feebc8bd41385dd4e91dd92a /cc/layer.cc
parent16b85e8a64fd14f425d9b12c8b6802d5e41c1853 (diff)
downloadchromium_src-da3a295bf286594bced1f26dfd1e0df97b28048a.zip
chromium_src-da3a295bf286594bced1f26dfd1e0df97b28048a.tar.gz
chromium_src-da3a295bf286594bced1f26dfd1e0df97b28048a.tar.bz2
cc: Don't return non-const Layer* from a const Layer.
Const methods should return const Layer*s. Non-const methods return non-const Layer*s. R=enne Review URL: https://chromiumcodereview.appspot.com/11299127 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168973 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layer.cc')
-rw-r--r--cc/layer.cc7
1 files changed, 1 insertions, 6 deletions
diff --git a/cc/layer.cc b/cc/layer.cc
index 5b608ce..5ba8451 100644
--- a/cc/layer.cc
+++ b/cc/layer.cc
@@ -136,7 +136,7 @@ void Layer::setParent(Layer* layer)
bool Layer::hasAncestor(Layer* ancestor) const
{
- for (Layer* layer = parent(); layer; layer = layer->parent()) {
+ for (const Layer* layer = parent(); layer; layer = layer->parent()) {
if (layer == ancestor)
return true;
}
@@ -504,11 +504,6 @@ void Layer::setIsDrawable(bool isDrawable)
setNeedsCommit();
}
-Layer* Layer::parent() const
-{
- return m_parent;
-}
-
void Layer::setNeedsDisplayRect(const gfx::RectF& dirtyRect)
{
m_updateRect.Union(dirtyRect);