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

Unified Diff: cc/surfaces/surface_aggregator_test_helpers.cc

Issue 448303002: Use custom ListContainer to allocate DrawQuads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@perftest
Patch Set: change header files to try fix compile error 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
« no previous file with comments | « cc/surfaces/surface_aggregator_test_helpers.h ('k') | cc/surfaces/surface_aggregator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 764ae48827db4b85cc985b458112f794e9dbecc5..8ecf89efe065fecb3466365b84db583963e49a42 100644
--- a/cc/surfaces/surface_aggregator_test_helpers.cc
+++ b/cc/surfaces/surface_aggregator_test_helpers.cc
@@ -106,7 +106,7 @@ void AddPasses(RenderPassList* pass_list,
}
}
-void TestQuadMatchesExpectations(Quad expected_quad, DrawQuad* quad) {
+void TestQuadMatchesExpectations(Quad expected_quad, const DrawQuad* quad) {
switch (expected_quad.material) {
case DrawQuad::SOLID_COLOR: {
ASSERT_EQ(DrawQuad::SOLID_COLOR, quad->material);
@@ -132,17 +132,21 @@ void TestQuadMatchesExpectations(Quad expected_quad, DrawQuad* quad) {
}
}
-void TestPassMatchesExpectations(Pass expected_pass, RenderPass* pass) {
+void TestPassMatchesExpectations(Pass expected_pass, const RenderPass* pass) {
ASSERT_EQ(expected_pass.quad_count, pass->quad_list.size());
- for (size_t i = 0u; i < pass->quad_list.size(); ++i) {
+ 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], pass->quad_list.at(i));
+ TestQuadMatchesExpectations(expected_pass.quads[i], &*iter);
+ ++i;
}
}
void TestPassesMatchExpectations(Pass* expected_passes,
size_t expected_pass_count,
- RenderPassList* passes) {
+ const RenderPassList* passes) {
ASSERT_EQ(expected_pass_count, passes->size());
for (size_t i = 0; i < passes->size(); ++i) {
« no previous file with comments | « cc/surfaces/surface_aggregator_test_helpers.h ('k') | cc/surfaces/surface_aggregator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698