summaryrefslogtreecommitdiffstats
path: root/cc/delegated_renderer_layer_impl.cc
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/delegated_renderer_layer_impl.cc
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/delegated_renderer_layer_impl.cc')
-rw-r--r--cc/delegated_renderer_layer_impl.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/cc/delegated_renderer_layer_impl.cc b/cc/delegated_renderer_layer_impl.cc
index bedf550..46edccf 100644
--- a/cc/delegated_renderer_layer_impl.cc
+++ b/cc/delegated_renderer_layer_impl.cc
@@ -24,7 +24,7 @@ DelegatedRendererLayerImpl::~DelegatedRendererLayerImpl()
bool DelegatedRendererLayerImpl::hasDelegatedContent() const
{
- return !m_renderPassesInDrawOrder.isEmpty();
+ return !m_renderPassesInDrawOrder.empty();
}
bool DelegatedRendererLayerImpl::hasContributingDelegatedRenderPasses() const
@@ -38,19 +38,19 @@ bool DelegatedRendererLayerImpl::hasContributingDelegatedRenderPasses() const
void DelegatedRendererLayerImpl::setRenderPasses(ScopedPtrVector<RenderPass>& renderPassesInDrawOrder)
{
gfx::RectF oldRootDamage;
- if (!m_renderPassesInDrawOrder.isEmpty())
- oldRootDamage = m_renderPassesInDrawOrder.last()->damage_rect;
+ if (!m_renderPassesInDrawOrder.empty())
+ oldRootDamage = m_renderPassesInDrawOrder.back()->damage_rect;
clearRenderPasses();
for (size_t i = 0; i < renderPassesInDrawOrder.size(); ++i) {
m_renderPassesIndexById.insert(std::pair<RenderPass::Id, int>(renderPassesInDrawOrder[i]->id, i));
- m_renderPassesInDrawOrder.append(renderPassesInDrawOrder.take(i));
+ m_renderPassesInDrawOrder.push_back(renderPassesInDrawOrder.take(renderPassesInDrawOrder.begin() + i));
}
renderPassesInDrawOrder.clear();
- if (!m_renderPassesInDrawOrder.isEmpty())
- m_renderPassesInDrawOrder.last()->damage_rect.Union(oldRootDamage);
+ if (!m_renderPassesInDrawOrder.empty())
+ m_renderPassesInDrawOrder.back()->damage_rect.Union(oldRootDamage);
}
void DelegatedRendererLayerImpl::clearRenderPasses()
@@ -102,7 +102,7 @@ void DelegatedRendererLayerImpl::appendContributingRenderPasses(RenderPassSink&
void DelegatedRendererLayerImpl::appendQuads(QuadSink& quadSink, AppendQuadsData& appendQuadsData)
{
- if (m_renderPassesInDrawOrder.isEmpty())
+ if (m_renderPassesInDrawOrder.empty())
return;
RenderPass::Id targetRenderPassId = appendQuadsData.renderPassId;
@@ -116,7 +116,7 @@ void DelegatedRendererLayerImpl::appendQuads(QuadSink& quadSink, AppendQuadsData
// Verify that the renderPass we are appending to is created our renderTarget.
DCHECK(targetRenderPassId.layer_id == renderTarget()->id());
- const RenderPass* rootDelegatedRenderPass = m_renderPassesInDrawOrder.last();
+ const RenderPass* rootDelegatedRenderPass = m_renderPassesInDrawOrder.back();
appendRenderPassQuads(quadSink, appendQuadsData, rootDelegatedRenderPass);
} else {
// Verify that the renderPass we are appending to was created by us.
@@ -141,7 +141,7 @@ void DelegatedRendererLayerImpl::appendRenderPassQuads(QuadSink& quadSink, Appen
bool targetIsFromDelegatedRendererLayer = appendQuadsData.renderPassId.layer_id == id();
if (!targetIsFromDelegatedRendererLayer) {
// Should be the root render pass.
- DCHECK(delegatedRenderPass == m_renderPassesInDrawOrder.last());
+ DCHECK(delegatedRenderPass == m_renderPassesInDrawOrder.back());
// This layer must be drawing to a renderTarget other than itself.
DCHECK(renderTarget() != this);