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

Unified Diff: cc/trees/layer_tree_host_unittest_copyrequest.cc

Issue 2751783002: cc: Replace LayerIterator with iterator that walks layer list and effect tree (Closed)
Patch Set: Rebase Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest_copyrequest.cc
diff --git a/cc/trees/layer_tree_host_unittest_copyrequest.cc b/cc/trees/layer_tree_host_unittest_copyrequest.cc
index 201c30f9fabc1f4df5145c60787bcb4e649059f4..c51f35b62caa1c52dc4a4acf65eba10e44d4c0a5 100644
--- a/cc/trees/layer_tree_host_unittest_copyrequest.cc
+++ b/cc/trees/layer_tree_host_unittest_copyrequest.cc
@@ -8,7 +8,7 @@
#include "base/memory/ptr_util.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
-#include "cc/layers/layer_iterator.h"
+#include "cc/layers/effect_tree_layer_list_iterator.h"
#include "cc/output/copy_output_request.h"
#include "cc/output/copy_output_result.h"
#include "cc/output/direct_renderer.h"
@@ -1227,14 +1227,12 @@ class LayerTreeHostCopyRequestTestMultipleDrawsHiddenCopyRequest
bool saw_root = false;
bool saw_child = false;
- for (LayerIterator it =
- LayerIterator::Begin(frame_data->render_surface_layer_list);
- it != LayerIterator::End(frame_data->render_surface_layer_list);
- ++it) {
- if (it.represents_itself()) {
- if (*it == root)
+ for (EffectTreeLayerListIterator it(host_impl->active_tree());
+ it.state() != EffectTreeLayerListIterator::State::END; ++it) {
+ if (it.state() == EffectTreeLayerListIterator::State::LAYER) {
+ if (it.current_layer() == root)
saw_root = true;
- else if (*it == child)
+ else if (it.current_layer() == child)
saw_child = true;
else
NOTREACHED();
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698