summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-26 22:31:47 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-26 22:31:47 +0000
commitc4584c6828619a02d1d93f6af329b0908128e432 (patch)
treea8d9d5da92f1b2db584c3651e91c95cb2bc632c4 /cc
parent5ea19bfec044ed648b61c5bf8e7540372b5544e1 (diff)
downloadchromium_src-c4584c6828619a02d1d93f6af329b0908128e432.zip
chromium_src-c4584c6828619a02d1d93f6af329b0908128e432.tar.gz
chromium_src-c4584c6828619a02d1d93f6af329b0908128e432.tar.bz2
Revert 253606 "Revert 251238 "cc: Clean up iterator template to ..."
> Revert 251238 "cc: Clean up iterator template to only take 1 par..." > > Speculative revert to see if this affects memory stomping behaviours. > > > cc: Clean up iterator template to only take 1 parameter. > > > > LayerIterator takes 4 parameters. One is the FrontToBack ordering > > but that is now the only option. The other 3 are for the type of layers, > > render surfaces, and the render surface layer list. The latter two are > > now already available as typedefs off of Layer and LayerImpl, so we > > only need Layer/LayerImpl in the template arguments. > > > > R=enne > > BUG=YAK > > > > Review URL: https://codereview.chromium.org/156603005 > > TBR=danakj@chromium.org > > Review URL: https://codereview.chromium.org/181783004 TBR=danakj@chromium.org Review URL: https://codereview.chromium.org/182343002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253610 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r--cc/cc.gyp1
-rw-r--r--cc/debug/debug_rect_history.cc5
-rw-r--r--cc/layers/layer_iterator.cc130
-rw-r--r--cc/layers/layer_iterator.h132
-rw-r--r--cc/layers/layer_iterator_unittest.cc5
-rw-r--r--cc/layers/render_surface.h4
-rw-r--r--cc/layers/render_surface_impl.h4
-rw-r--r--cc/trees/layer_tree_host.cc16
-rw-r--r--cc/trees/layer_tree_host_common.cc6
-rw-r--r--cc/trees/layer_tree_host_impl.cc7
-rw-r--r--cc/trees/layer_tree_impl.cc10
-rw-r--r--cc/trees/occlusion_tracker_perftest.cc8
-rw-r--r--cc/trees/occlusion_tracker_unittest.cc10
-rw-r--r--cc/trees/quad_culler_unittest.cc5
14 files changed, 97 insertions, 246 deletions
diff --git a/cc/cc.gyp b/cc/cc.gyp
index 3ebe1d4d..0b3308d 100644
--- a/cc/cc.gyp
+++ b/cc/cc.gyp
@@ -162,7 +162,6 @@
'layers/layer_client.h',
'layers/layer_impl.cc',
'layers/layer_impl.h',
- 'layers/layer_iterator.cc',
'layers/layer_iterator.h',
'layers/layer_lists.cc',
'layers/layer_lists.h',
diff --git a/cc/debug/debug_rect_history.cc b/cc/debug/debug_rect_history.cc
index 2f01f4a..4241823 100644
--- a/cc/debug/debug_rect_history.cc
+++ b/cc/debug/debug_rect_history.cc
@@ -238,10 +238,7 @@ void DebugRectHistory::SaveNonFastScrollableRectsCallback(LayerImpl* layer) {
void DebugRectHistory::SaveLayerAnimationBoundsRects(
const LayerImplList& render_surface_layer_list) {
- typedef LayerIterator<LayerImpl,
- LayerImplList,
- RenderSurfaceImpl,
- LayerIteratorActions::FrontToBack> LayerIteratorType;
+ typedef LayerIterator<LayerImpl> LayerIteratorType;
LayerIteratorType end = LayerIteratorType::End(&render_surface_layer_list);
for (LayerIteratorType it =
LayerIteratorType::Begin(&render_surface_layer_list);
diff --git a/cc/layers/layer_iterator.cc b/cc/layers/layer_iterator.cc
deleted file mode 100644
index a52c3f1..0000000
--- a/cc/layers/layer_iterator.cc
+++ /dev/null
@@ -1,130 +0,0 @@
-// Copyright 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "cc/layers/layer_iterator.h"
-
-#include <vector>
-
-#include "cc/layers/layer.h"
-#include "cc/layers/layer_impl.h"
-#include "cc/layers/render_surface.h"
-#include "cc/layers/render_surface_impl.h"
-
-namespace cc {
-
-template <typename LayerType,
- typename LayerList,
- typename RenderSurfaceType,
- typename ActionType>
-void LayerIteratorActions::FrontToBack::Begin(
- LayerIterator<LayerType, LayerList, RenderSurfaceType, ActionType>* it) {
- it->target_render_surface_layer_index_ = 0;
- it->current_layer_index_ = it->target_render_surface_children().size() - 1;
- GoToHighestInSubtree(it);
-}
-
-template <typename LayerType,
- typename LayerList,
- typename RenderSurfaceType,
- typename ActionType>
-void LayerIteratorActions::FrontToBack::End(
- LayerIterator<LayerType, LayerList, RenderSurfaceType, ActionType>* it) {
- it->target_render_surface_layer_index_ =
- LayerIteratorValue::kInvalidTargetRenderSurfaceLayerIndex;
- it->current_layer_index_ = 0;
-}
-
-template <typename LayerType,
- typename LayerList,
- typename RenderSurfaceType,
- typename ActionType>
-void LayerIteratorActions::FrontToBack::Next(
- LayerIterator<LayerType, LayerList, RenderSurfaceType, ActionType>* it) {
- // Moves to the previous layer in the current RS layer list.
- // Then we check if the new current layer has its own RS,
- // in which case there are things in that RS layer list that are higher,
- // so we find the highest layer in that subtree.
- // If we move back past the front of the list,
- // we jump up to the previous RS layer list, picking up again where we
- // had previously recursed into the current RS layer list.
-
- if (!it->current_layer_represents_target_render_surface()) {
- // Subtracting one here will eventually cause the current layer
- // to become that layer representing the target render surface.
- --it->current_layer_index_;
- GoToHighestInSubtree(it);
- } else {
- while (it->current_layer_represents_target_render_surface()) {
- if (!it->target_render_surface_layer_index_) {
- // End of the list
- it->target_render_surface_layer_index_ =
- LayerIteratorValue::kInvalidTargetRenderSurfaceLayerIndex;
- it->current_layer_index_ = 0;
- return;
- }
- it->target_render_surface_layer_index_ = it->target_render_surface()
- ->target_render_surface_layer_index_history_;
- it->current_layer_index_ =
- it->target_render_surface()->current_layer_index_history_;
- }
- }
-}
-
-template <typename LayerType,
- typename LayerList,
- typename RenderSurfaceType,
- typename ActionType>
-void LayerIteratorActions::FrontToBack::GoToHighestInSubtree(
- LayerIterator<LayerType, LayerList, RenderSurfaceType, ActionType>* it) {
- if (it->current_layer_represents_target_render_surface())
- return;
- while (it->current_layer_represents_contributing_render_surface()) {
- // Save where we were in the current target surface, move to the next one,
- // and save the target surface that we came from there
- // so we can go back to it.
- it->target_render_surface()->current_layer_index_history_ =
- it->current_layer_index_;
- int previous_target_render_surface_layer =
- it->target_render_surface_layer_index_;
-
- for (LayerType* layer = it->current_layer();
- it->target_render_surface_layer() != layer;
- ++it->target_render_surface_layer_index_) {
- }
- it->current_layer_index_ = it->target_render_surface_children().size() - 1;
-
- it->target_render_surface()->target_render_surface_layer_index_history_ =
- previous_target_render_surface_layer;
- }
-}
-
-// Declare each of the above functions for Layer and LayerImpl classes
-// so that they are linked.
-template CC_EXPORT void LayerIteratorActions::FrontToBack::Next(
- LayerIterator<Layer, RenderSurfaceLayerList, RenderSurface, FrontToBack>*
- it);
-template CC_EXPORT void LayerIteratorActions::FrontToBack::End(
- LayerIterator<Layer, RenderSurfaceLayerList, RenderSurface, FrontToBack>*
- it);
-template CC_EXPORT void LayerIteratorActions::FrontToBack::Begin(
- LayerIterator<Layer, RenderSurfaceLayerList, RenderSurface, FrontToBack>*
- it);
-template CC_EXPORT void LayerIteratorActions::FrontToBack::GoToHighestInSubtree(
- LayerIterator<Layer, RenderSurfaceLayerList, RenderSurface, FrontToBack>*
- it);
-
-template CC_EXPORT void LayerIteratorActions::FrontToBack::Next(
- LayerIterator<LayerImpl, LayerImplList, RenderSurfaceImpl, FrontToBack>*
- it);
-template CC_EXPORT void LayerIteratorActions::FrontToBack::End(
- LayerIterator<LayerImpl, LayerImplList, RenderSurfaceImpl, FrontToBack>*
- it);
-template CC_EXPORT void LayerIteratorActions::FrontToBack::Begin(
- LayerIterator<LayerImpl, LayerImplList, RenderSurfaceImpl, FrontToBack>*
- it);
-template CC_EXPORT void LayerIteratorActions::FrontToBack::GoToHighestInSubtree(
- LayerIterator<LayerImpl, LayerImplList, RenderSurfaceImpl, FrontToBack>*
- it);
-
-} // namespace cc
diff --git a/cc/layers/layer_iterator.h b/cc/layers/layer_iterator.h
index 5b13273..f929eb6 100644
--- a/cc/layers/layer_iterator.h
+++ b/cc/layers/layer_iterator.h
@@ -5,7 +5,6 @@
#ifndef CC_LAYERS_LAYER_ITERATOR_H_
#define CC_LAYERS_LAYER_ITERATOR_H_
-#include "base/memory/ref_counted.h"
#include "cc/base/cc_export.h"
#include "cc/trees/layer_tree_host_common.h"
@@ -19,11 +18,7 @@ namespace cc {
//
// void DoStuffOnLayers(
// const RenderSurfaceLayerList& render_surface_layer_list) {
-// typedef LayerIterator<Layer,
-// RenderSurfaceLayerList,
-// RenderSurface,
-// LayerIteratorActions::FrontToBack>
-// LayerIteratorType;
+// typedef LayerIterator<Layer> LayerIteratorType;
//
// LayerIteratorType end =
// LayerIteratorType::End(&render_surface_layer_list);
@@ -105,15 +100,11 @@ template <typename LayerType> struct LayerIteratorPosition {
// An iterator class for walking over layers in the
// RenderSurface-Layer tree.
-template <typename LayerType,
- typename LayerList,
- typename RenderSurfaceType,
- typename IteratorActionType>
+template <typename LayerType>
class LayerIterator {
- typedef LayerIterator<LayerType,
- LayerList,
- RenderSurfaceType,
- IteratorActionType> LayerIteratorType;
+ typedef LayerIterator<LayerType> LayerIteratorType;
+ typedef typename LayerType::RenderSurfaceListType LayerList;
+ typedef typename LayerType::RenderSurfaceType RenderSurfaceType;
public:
LayerIterator() : render_surface_layer_list_(NULL) {}
@@ -126,7 +117,7 @@ class LayerIterator {
}
LayerIteratorType& operator++() {
- actions_.Next(this);
+ MoveToNext();
return *this;
}
bool operator==(const LayerIterator& other) const {
@@ -176,15 +167,81 @@ class LayerIterator {
for (size_t i = 0; i < render_surface_layer_list->size(); ++i) {
if (!render_surface_layer_list->at(i)->render_surface()) {
NOTREACHED();
- actions_.End(this);
+ MoveToEnd();
return;
}
}
if (start && !render_surface_layer_list->empty())
- actions_.Begin(this);
+ MoveToBegin();
else
- actions_.End(this);
+ MoveToEnd();
+ }
+
+ void MoveToBegin() {
+ target_render_surface_layer_index_ = 0;
+ current_layer_index_ = target_render_surface_children().size() - 1;
+ MoveToHighestInSubtree();
+ }
+
+ void MoveToEnd() {
+ target_render_surface_layer_index_ =
+ LayerIteratorValue::kInvalidTargetRenderSurfaceLayerIndex;
+ current_layer_index_ = 0;
+ }
+
+ void MoveToNext() {
+ // Moves to the previous layer in the current RS layer list.
+ // Then we check if the new current layer has its own RS,
+ // in which case there are things in that RS layer list that are higher,
+ // so we find the highest layer in that subtree.
+ // If we move back past the front of the list,
+ // we jump up to the previous RS layer list, picking up again where we
+ // had previously recursed into the current RS layer list.
+
+ if (!current_layer_represents_target_render_surface()) {
+ // Subtracting one here will eventually cause the current layer
+ // to become that layer representing the target render surface.
+ --current_layer_index_;
+ MoveToHighestInSubtree();
+ } else {
+ while (current_layer_represents_target_render_surface()) {
+ if (!target_render_surface_layer_index_) {
+ // End of the list.
+ target_render_surface_layer_index_ =
+ LayerIteratorValue::kInvalidTargetRenderSurfaceLayerIndex;
+ current_layer_index_ = 0;
+ return;
+ }
+ target_render_surface_layer_index_ =
+ target_render_surface()->target_render_surface_layer_index_history_;
+ current_layer_index_ =
+ target_render_surface()->current_layer_index_history_;
+ }
+ }
+ }
+
+ void MoveToHighestInSubtree() {
+ if (current_layer_represents_target_render_surface())
+ return;
+ while (current_layer_represents_contributing_render_surface()) {
+ // Save where we were in the current target surface, move to the next one,
+ // and save the target surface that we came from there
+ // so we can go back to it.
+ target_render_surface()->current_layer_index_history_ =
+ current_layer_index_;
+ int previous_target_render_surface_layer =
+ target_render_surface_layer_index_;
+
+ for (LayerType* layer = current_layer();
+ target_render_surface_layer() != layer;
+ ++target_render_surface_layer_index_) {
+ }
+ current_layer_index_ = target_render_surface_children().size() - 1;
+
+ target_render_surface()->target_render_surface_layer_index_history_ =
+ previous_target_render_surface_layer;
+ }
}
inline LayerType* current_layer() const {
@@ -209,7 +266,6 @@ class LayerIterator {
return target_render_surface()->layer_list();
}
- IteratorActionType actions_;
const LayerList* render_surface_layer_list_;
// The iterator's current position.
@@ -228,44 +284,6 @@ class LayerIterator {
// the target surface, this is done by setting the current_layerIndex
// to a value of LayerIteratorValue::LayerRepresentingTargetRenderSurface.
int current_layer_index_;
-
- friend struct LayerIteratorActions;
-};
-
-// Orderings for iterating over the RenderSurface-Layer tree.
-struct CC_EXPORT LayerIteratorActions {
- // Walks layers sorted by z-order from front to back
- class CC_EXPORT FrontToBack {
- public:
- template <typename LayerType,
- typename LayerList,
- typename RenderSurfaceType,
- typename ActionType>
- void Begin(
- LayerIterator<LayerType, LayerList, RenderSurfaceType, ActionType>* it);
-
- template <typename LayerType,
- typename LayerList,
- typename RenderSurfaceType,
- typename ActionType>
- void End(
- LayerIterator<LayerType, LayerList, RenderSurfaceType, ActionType>* it);
-
- template <typename LayerType,
- typename LayerList,
- typename RenderSurfaceType,
- typename ActionType>
- void Next(
- LayerIterator<LayerType, LayerList, RenderSurfaceType, ActionType>* it);
-
- private:
- template <typename LayerType,
- typename LayerList,
- typename RenderSurfaceType,
- typename ActionType>
- void GoToHighestInSubtree(
- LayerIterator<LayerType, LayerList, RenderSurfaceType, ActionType>* it);
- };
};
} // namespace cc
diff --git a/cc/layers/layer_iterator_unittest.cc b/cc/layers/layer_iterator_unittest.cc
index c781d28..61d7a61 100644
--- a/cc/layers/layer_iterator_unittest.cc
+++ b/cc/layers/layer_iterator_unittest.cc
@@ -50,10 +50,7 @@ class TestLayer : public Layer {
EXPECT_EQ(contrib, layer->count_representing_contributing_surface_); \
EXPECT_EQ(itself, layer->count_representing_itself_);
-typedef LayerIterator<Layer,
- RenderSurfaceLayerList,
- RenderSurface,
- LayerIteratorActions::FrontToBack> FrontToBack;
+typedef LayerIterator<Layer> FrontToBack;
void ResetCounts(RenderSurfaceLayerList* render_surface_layer_list) {
for (unsigned surface_index = 0;
diff --git a/cc/layers/render_surface.h b/cc/layers/render_surface.h
index b0da4e9..ace787a 100644
--- a/cc/layers/render_surface.h
+++ b/cc/layers/render_surface.h
@@ -19,6 +19,8 @@
namespace cc {
class Layer;
+template <typename LayerType>
+class LayerIterator;
class CC_EXPORT RenderSurface {
public:
@@ -112,7 +114,7 @@ class CC_EXPORT RenderSurface {
}
private:
- friend struct LayerIteratorActions;
+ friend class LayerIterator<Layer>;
Layer* owning_layer_;
diff --git a/cc/layers/render_surface_impl.h b/cc/layers/render_surface_impl.h
index d6ab409..8cbc4fe 100644
--- a/cc/layers/render_surface_impl.h
+++ b/cc/layers/render_surface_impl.h
@@ -25,6 +25,8 @@ class DelegatedRendererLayerImpl;
class QuadSink;
class RenderPassSink;
class LayerImpl;
+template <typename LayerType>
+class LayerIterator;
struct AppendQuadsData;
@@ -174,7 +176,7 @@ class CC_EXPORT RenderSurfaceImpl {
int target_render_surface_layer_index_history_;
int current_layer_index_history_;
- friend struct LayerIteratorActions;
+ friend class LayerIterator<LayerImpl>;
DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl);
};
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index bbcdee4..5972a9f 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -887,12 +887,8 @@ void LayerTreeHost::SetPrioritiesForSurfaces(size_t surface_memory_bytes) {
void LayerTreeHost::SetPrioritiesForLayers(
const RenderSurfaceLayerList& update_list) {
- typedef LayerIterator<Layer,
- RenderSurfaceLayerList,
- RenderSurface,
- LayerIteratorActions::FrontToBack> LayerIteratorType;
-
PriorityCalculator calculator;
+ typedef LayerIterator<Layer> LayerIteratorType;
LayerIteratorType end = LayerIteratorType::End(&update_list);
for (LayerIteratorType it = LayerIteratorType::Begin(&update_list);
it != end;
@@ -989,13 +985,6 @@ void LayerTreeHost::PaintLayerContents(
ResourceUpdateQueue* queue,
bool* did_paint_content,
bool* need_more_updates) {
- // Use FrontToBack to allow for testing occlusion and performing culling
- // during the tree walk.
- typedef LayerIterator<Layer,
- RenderSurfaceLayerList,
- RenderSurface,
- LayerIteratorActions::FrontToBack> LayerIteratorType;
-
bool record_metrics_for_frame =
settings_.show_overdraw_in_tracing &&
base::debug::TraceLog::GetInstance() &&
@@ -1010,6 +999,9 @@ void LayerTreeHost::PaintLayerContents(
in_paint_layer_contents_ = true;
+ // Iterates front-to-back to allow for testing occlusion and performing
+ // culling during the tree walk.
+ typedef LayerIterator<Layer> LayerIteratorType;
LayerIteratorType end = LayerIteratorType::End(&render_surface_layer_list);
for (LayerIteratorType it =
LayerIteratorType::Begin(&render_surface_layer_list);
diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc
index 587a285..ddee393 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -2324,12 +2324,8 @@ LayerImpl* LayerTreeHostCommon::FindLayerThatIsHitByPoint(
const LayerImplList& render_surface_layer_list) {
LayerImpl* found_layer = NULL;
- typedef LayerIterator<LayerImpl,
- LayerImplList,
- RenderSurfaceImpl,
- LayerIteratorActions::FrontToBack> LayerIteratorType;
+ typedef LayerIterator<LayerImpl> LayerIteratorType;
LayerIteratorType end = LayerIteratorType::End(&render_surface_layer_list);
-
for (LayerIteratorType
it = LayerIteratorType::Begin(&render_surface_layer_list);
it != end;
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index d090ddc..e8155dd 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -762,12 +762,9 @@ DrawSwapReadbackResult::DrawResult LayerTreeHostImpl::CalculateRenderPasses(
&frame->non_occluding_screen_space_rects);
}
- // Add quads to the Render passes in FrontToBack order to allow for testing
+ // Add quads to the Render passes in front-to-back order to allow for testing
// occlusion and performing culling during the tree walk.
- typedef LayerIterator<LayerImpl,
- LayerImplList,
- RenderSurfaceImpl,
- LayerIteratorActions::FrontToBack> LayerIteratorType;
+ typedef LayerIterator<LayerImpl> LayerIteratorType;
// Typically when we are missing a texture and use a checkerboard quad, we
// still draw the frame. However when the layer being checkerboarded is moving
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 99129ee..d7e4107 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -482,10 +482,7 @@ void LayerTreeImpl::UpdateDrawProperties() {
// LayerIterator is used here instead of CallFunctionForSubtree to only
// UpdateTilePriorities on layers that will be visible (and thus have valid
// draw properties) and not because any ordering is required.
- typedef LayerIterator<LayerImpl,
- LayerImplList,
- RenderSurfaceImpl,
- LayerIteratorActions::FrontToBack> LayerIteratorType;
+ typedef LayerIterator<LayerImpl> LayerIteratorType;
LayerIteratorType end = LayerIteratorType::End(&render_surface_layer_list_);
for (LayerIteratorType it =
LayerIteratorType::Begin(&render_surface_layer_list_);
@@ -739,10 +736,7 @@ scoped_ptr<base::Value> LayerTreeImpl::AsValue() const {
state->Set("root_layer", root_layer_->AsValue().release());
scoped_ptr<base::ListValue> render_surface_layer_list(new base::ListValue());
- typedef LayerIterator<LayerImpl,
- LayerImplList,
- RenderSurfaceImpl,
- LayerIteratorActions::FrontToBack> LayerIteratorType;
+ typedef LayerIterator<LayerImpl> LayerIteratorType;
LayerIteratorType end = LayerIteratorType::End(&render_surface_layer_list_);
for (LayerIteratorType it = LayerIteratorType::Begin(
&render_surface_layer_list_); it != end; ++it) {
diff --git a/cc/trees/occlusion_tracker_perftest.cc b/cc/trees/occlusion_tracker_perftest.cc
index 86cb4e6..f4a2faf 100644
--- a/cc/trees/occlusion_tracker_perftest.cc
+++ b/cc/trees/occlusion_tracker_perftest.cc
@@ -91,12 +91,8 @@ TEST_F(OcclusionTrackerPerfTest, UnoccludedContentRect_FullyOccluded) {
ASSERT_EQ(1u, rsll.size());
EXPECT_EQ(1u, rsll[0]->render_surface()->layer_list().size());
- typedef LayerIterator<LayerImpl,
- LayerImpl::LayerListType,
- LayerImpl::RenderSurfaceType,
- LayerIteratorActions::FrontToBack> IteratorType;
- IteratorType begin = IteratorType::Begin(&rsll);
- IteratorType end = IteratorType::End(&rsll);
+ LayerIterator<LayerImpl> begin = LayerIterator<LayerImpl>::Begin(&rsll);
+ LayerIterator<LayerImpl> end = LayerIterator<LayerImpl>::End(&rsll);
LayerIteratorPosition<LayerImpl> pos = begin;
diff --git a/cc/trees/occlusion_tracker_unittest.cc b/cc/trees/occlusion_tracker_unittest.cc
index 81377f6..3e4ff5b 100644
--- a/cc/trees/occlusion_tracker_unittest.cc
+++ b/cc/trees/occlusion_tracker_unittest.cc
@@ -122,10 +122,7 @@ struct OcclusionTrackerTestMainThreadTypes {
typedef TestContentLayer ContentLayerType;
typedef scoped_refptr<Layer> LayerPtrType;
typedef scoped_refptr<ContentLayerType> ContentLayerPtrType;
- typedef LayerIterator<Layer,
- RenderSurfaceLayerList,
- RenderSurface,
- LayerIteratorActions::FrontToBack> TestLayerIterator;
+ typedef LayerIterator<Layer> TestLayerIterator;
typedef OcclusionTracker OcclusionTrackerType;
static LayerPtrType CreateLayer(HostType* host) { return Layer::Create(); }
@@ -155,10 +152,7 @@ struct OcclusionTrackerTestImplThreadTypes {
typedef TestContentLayerImpl ContentLayerType;
typedef scoped_ptr<LayerImpl> LayerPtrType;
typedef scoped_ptr<ContentLayerType> ContentLayerPtrType;
- typedef LayerIterator<LayerImpl,
- LayerImplList,
- RenderSurfaceImpl,
- LayerIteratorActions::FrontToBack> TestLayerIterator;
+ typedef LayerIterator<LayerImpl> TestLayerIterator;
typedef OcclusionTrackerImpl OcclusionTrackerType;
static LayerPtrType CreateLayer(HostType* host) {
diff --git a/cc/trees/quad_culler_unittest.cc b/cc/trees/quad_culler_unittest.cc
index 9a5b562..ee97319 100644
--- a/cc/trees/quad_culler_unittest.cc
+++ b/cc/trees/quad_culler_unittest.cc
@@ -39,10 +39,7 @@ class TestOcclusionTrackerImpl
DISALLOW_COPY_AND_ASSIGN(TestOcclusionTrackerImpl);
};
-typedef LayerIterator<LayerImpl,
- LayerImplList,
- RenderSurfaceImpl,
- LayerIteratorActions::FrontToBack> LayerIteratorType;
+typedef LayerIterator<LayerImpl> LayerIteratorType;
class QuadCullerTest : public testing::Test {
public: