summaryrefslogtreecommitdiffstats
path: root/cc/test
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-09 07:22:45 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-09 07:22:45 +0000
commitead39c5d73da35d0e0e4e9c1a02c53ec3727cb53 (patch)
treeb42ce1909161c94b5e72eae7bd4a6ec878d5c6b7 /cc/test
parent46ad823d93a1223e34ea3160284d45163ab7a2d0 (diff)
downloadchromium_src-ead39c5d73da35d0e0e4e9c1a02c53ec3727cb53.zip
chromium_src-ead39c5d73da35d0e0e4e9c1a02c53ec3727cb53.tar.gz
chromium_src-ead39c5d73da35d0e0e4e9c1a02c53ec3727cb53.tar.bz2
cc: Make the ScopedPtrVector and ScopedPtrDeque containers act like STL vector and deque.
These classes used methods to match the webcore classes and ease migration. Now they are at odds with the STL versions of these containers. Rename the methods, and change arguments from indexes to iterators, to match the STL containers. isEmpty() => empty() last() => back() first() => front() Peek() => at() append() => push_back() insert(index, value) => insert(iterator, value) remove(index) => erase(iterator) and erase(iterator, iterator) take(index) => take(iterator) takeFront() => take_front() takeBack() => take_back() Review URL: https://chromiumcodereview.appspot.com/11418108 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175722 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test')
-rw-r--r--cc/test/mock_quad_culler.cc4
-rw-r--r--cc/test/render_pass_test_common.h4
-rw-r--r--cc/test/render_pass_test_utils.cc2
3 files changed, 5 insertions, 5 deletions
diff --git a/cc/test/mock_quad_culler.cc b/cc/test/mock_quad_culler.cc
index 8f109dd..b4f8cdf 100644
--- a/cc/test/mock_quad_culler.cc
+++ b/cc/test/mock_quad_culler.cc
@@ -25,7 +25,7 @@ MockQuadCuller::~MockQuadCuller()
bool MockQuadCuller::append(scoped_ptr<DrawQuad> drawQuad, AppendQuadsData&)
{
if (!drawQuad->rect.IsEmpty()) {
- m_activeQuadList.append(drawQuad.Pass());
+ m_activeQuadList.push_back(drawQuad.Pass());
return true;
}
return false;
@@ -34,7 +34,7 @@ bool MockQuadCuller::append(scoped_ptr<DrawQuad> drawQuad, AppendQuadsData&)
SharedQuadState* MockQuadCuller::useSharedQuadState(scoped_ptr<SharedQuadState> sharedQuadState)
{
SharedQuadState* rawPtr = sharedQuadState.get();
- m_activeSharedQuadStateList.append(sharedQuadState.Pass());
+ m_activeSharedQuadStateList.push_back(sharedQuadState.Pass());
return rawPtr;
}
diff --git a/cc/test/render_pass_test_common.h b/cc/test/render_pass_test_common.h
index c565df0..199a618 100644
--- a/cc/test/render_pass_test_common.h
+++ b/cc/test/render_pass_test_common.h
@@ -20,10 +20,10 @@ class TestRenderPass : public cc::RenderPass {
}
void AppendQuad(scoped_ptr<cc::DrawQuad> quad) {
- quad_list.append(quad.Pass());
+ quad_list.push_back(quad.Pass());
}
void AppendSharedQuadState(scoped_ptr<cc::SharedQuadState> state) {
- shared_quad_state_list.append(state.Pass());
+ shared_quad_state_list.push_back(state.Pass());
}
void AppendOneOfEveryQuadType(cc::ResourceProvider*);
diff --git a/cc/test/render_pass_test_utils.cc b/cc/test/render_pass_test_utils.cc
index aa0cc034..a793505 100644
--- a/cc/test/render_pass_test_utils.cc
+++ b/cc/test/render_pass_test_utils.cc
@@ -22,7 +22,7 @@ TestRenderPass* addRenderPass(ScopedPtrVector<RenderPass>& passList,
scoped_ptr<TestRenderPass> pass(TestRenderPass::Create());
pass->SetNew(id, outputRect, outputRect, rootTransform);
TestRenderPass* saved = pass.get();
- passList.append(pass.PassAs<RenderPass>());
+ passList.push_back(pass.PassAs<RenderPass>());
return saved;
}