Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: cc/CCLayerImpl.cpp

Issue 10940002: Add wrapper container for a vector of OwnPtr<T> (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/CCLayerImpl.h ('k') | cc/CCLayerImplTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #if USE(ACCELERATED_COMPOSITING) 7 #if USE(ACCELERATED_COMPOSITING)
8 8
9 #include "CCLayerImpl.h" 9 #include "CCLayerImpl.h"
10 10
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 void CCLayerImpl::removeFromParent() 82 void CCLayerImpl::removeFromParent()
83 { 83 {
84 if (!m_parent) 84 if (!m_parent)
85 return; 85 return;
86 86
87 CCLayerImpl* parent = m_parent; 87 CCLayerImpl* parent = m_parent;
88 m_parent = 0; 88 m_parent = 0;
89 89
90 for (size_t i = 0; i < parent->m_children.size(); ++i) { 90 for (size_t i = 0; i < parent->m_children.size(); ++i) {
91 if (parent->m_children[i].get() == this) { 91 if (parent->m_children[i] == this) {
92 parent->m_children.remove(i); 92 parent->m_children.remove(i);
93 return; 93 return;
94 } 94 }
95 } 95 }
96 } 96 }
97 97
98 void CCLayerImpl::removeAllChildren() 98 void CCLayerImpl::removeAllChildren()
99 { 99 {
100 while (m_children.size()) 100 while (m_children.size())
101 m_children[0]->removeFromParent(); 101 m_children[0]->removeFromParent();
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 if (!m_scrollbarAnimationController) 619 if (!m_scrollbarAnimationController)
620 m_scrollbarAnimationController = CCScrollbarAnimationController::create( this); 620 m_scrollbarAnimationController = CCScrollbarAnimationController::create( this);
621 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); 621 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer);
622 m_scrollbarAnimationController->updateScrollOffset(this); 622 m_scrollbarAnimationController->updateScrollOffset(this);
623 } 623 }
624 624
625 } 625 }
626 626
627 627
628 #endif // USE(ACCELERATED_COMPOSITING) 628 #endif // USE(ACCELERATED_COMPOSITING)
OLDNEW
« no previous file with comments | « cc/CCLayerImpl.h ('k') | cc/CCLayerImplTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698