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

Side by Side Diff: cc/surfaces/surface_aggregator_test_helpers.cc

Issue 683113005: Update from chromium https://crrev.com/302282 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « cc/surfaces/surface_aggregator.cc ('k') | cc/test/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/surfaces/surface_aggregator_test_helpers.h" 5 #include "cc/surfaces/surface_aggregator_test_helpers.h"
6 6
7 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "cc/layers/append_quads_data.h" 9 #include "cc/layers/append_quads_data.h"
10 #include "cc/output/compositor_frame.h" 10 #include "cc/output/compositor_frame.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 NOTREACHED(); 131 NOTREACHED();
132 break; 132 break;
133 } 133 }
134 } 134 }
135 135
136 void TestPassMatchesExpectations(Pass expected_pass, const RenderPass* pass) { 136 void TestPassMatchesExpectations(Pass expected_pass, const RenderPass* pass) {
137 ASSERT_EQ(expected_pass.quad_count, pass->quad_list.size()); 137 ASSERT_EQ(expected_pass.quad_count, pass->quad_list.size());
138 for (auto iter = pass->quad_list.cbegin(); iter != pass->quad_list.cend(); 138 for (auto iter = pass->quad_list.cbegin(); iter != pass->quad_list.cend();
139 ++iter) { 139 ++iter) {
140 SCOPED_TRACE(base::StringPrintf("Quad number %" PRIuS, iter.index())); 140 SCOPED_TRACE(base::StringPrintf("Quad number %" PRIuS, iter.index()));
141 TestQuadMatchesExpectations(expected_pass.quads[iter.index()], &*iter); 141 TestQuadMatchesExpectations(expected_pass.quads[iter.index()], *iter);
142 } 142 }
143 } 143 }
144 144
145 void TestPassesMatchExpectations(Pass* expected_passes, 145 void TestPassesMatchExpectations(Pass* expected_passes,
146 size_t expected_pass_count, 146 size_t expected_pass_count,
147 const RenderPassList* passes) { 147 const RenderPassList* passes) {
148 ASSERT_EQ(expected_pass_count, passes->size()); 148 ASSERT_EQ(expected_pass_count, passes->size());
149 149
150 for (size_t i = 0; i < passes->size(); ++i) { 150 for (size_t i = 0; i < passes->size(); ++i) {
151 SCOPED_TRACE(base::StringPrintf("Pass number %" PRIuS, i)); 151 SCOPED_TRACE(base::StringPrintf("Pass number %" PRIuS, i));
152 RenderPass* pass = passes->at(i); 152 RenderPass* pass = passes->at(i);
153 TestPassMatchesExpectations(expected_passes[i], pass); 153 TestPassMatchesExpectations(expected_passes[i], pass);
154 } 154 }
155 } 155 }
156 156
157 } // namespace test 157 } // namespace test
158 } // namespace cc 158 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/surface_aggregator.cc ('k') | cc/test/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698