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

Unified Diff: cc/surfaces/surface_aggregator_test_helpers.cc

Issue 551013002: Use Custome ListContainer to Allocate SharedQuadState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@DQAllo
Patch Set: use C++ range based loop Created 6 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 side-by-side diff with in-line comments
Download patch
Index: cc/surfaces/surface_aggregator_test_helpers.cc
diff --git a/cc/surfaces/surface_aggregator_test_helpers.cc b/cc/surfaces/surface_aggregator_test_helpers.cc
index 8ecf89efe065fecb3466365b84db583963e49a42..8afead151b1f18f01f1dd96ef2688ba003f86fd3 100644
--- a/cc/surfaces/surface_aggregator_test_helpers.cc
+++ b/cc/surfaces/surface_aggregator_test_helpers.cc
@@ -134,13 +134,11 @@ void TestQuadMatchesExpectations(Quad expected_quad, const DrawQuad* quad) {
void TestPassMatchesExpectations(Pass expected_pass, const RenderPass* pass) {
ASSERT_EQ(expected_pass.quad_count, pass->quad_list.size());
- size_t i = 0;
for (QuadList::ConstIterator iter = pass->quad_list.begin();
iter != pass->quad_list.end();
++iter) {
- SCOPED_TRACE(base::StringPrintf("Quad number %" PRIuS, i));
- TestQuadMatchesExpectations(expected_pass.quads[i], &*iter);
- ++i;
+ SCOPED_TRACE(base::StringPrintf("Quad number %" PRIuS, iter.index()));
+ TestQuadMatchesExpectations(expected_pass.quads[iter.index()], &*iter);
}
}

Powered by Google App Engine
This is Rietveld 408576698