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

Unified Diff: cc/trees/layer_tree_host_impl.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/test/layer_test_common.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 788c71ec4d3e8538e56f3515ef5fb1a52a6c05df..29e29c34c78ceff1a537116ab46794c88e108e4c 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -902,8 +902,10 @@ DrawResult LayerTreeHostImpl::CalculateRenderPasses(
#if DCHECK_IS_ON
for (size_t i = 0; i < frame->render_passes.size(); ++i) {
- for (size_t j = 0; j < frame->render_passes[i]->quad_list.size(); ++j)
- DCHECK(frame->render_passes[i]->quad_list[j]->shared_quad_state);
+ for (QuadList::Iterator iter = frame->render_passes[i]->quad_list.begin();
+ iter != frame->render_passes[i]->quad_list.end();
+ ++iter)
+ DCHECK(iter->shared_quad_state);
DCHECK(frame->render_passes_by_id.find(frame->render_passes[i]->id)
!= frame->render_passes_by_id.end());
}
@@ -1025,7 +1027,7 @@ static void RemoveRenderPassesRecursive(RenderPassId remove_render_pass_id,
quad_list.BackToFrontBegin();
for (; quad_list_iterator != quad_list.BackToFrontEnd();
++quad_list_iterator) {
- DrawQuad* current_quad = (*quad_list_iterator);
+ const DrawQuad* current_quad = &*quad_list_iterator;
if (current_quad->material != DrawQuad::RENDER_PASS)
continue;
@@ -1048,7 +1050,7 @@ bool LayerTreeHostImpl::CullRenderPassesWithNoQuads::ShouldRemoveRenderPass(
quad_list.BackToFrontBegin();
quad_list_iterator != quad_list.BackToFrontEnd();
++quad_list_iterator) {
- DrawQuad* current_quad = *quad_list_iterator;
+ const DrawQuad* current_quad = &*quad_list_iterator;
if (current_quad->material != DrawQuad::RENDER_PASS)
return false;
@@ -1080,7 +1082,7 @@ void LayerTreeHostImpl::RemoveRenderPasses(RenderPassCuller culler,
for (; quad_list_iterator != quad_list.BackToFrontEnd();
++quad_list_iterator) {
- DrawQuad* current_quad = *quad_list_iterator;
+ const DrawQuad* current_quad = &*quad_list_iterator;
if (current_quad->material != DrawQuad::RENDER_PASS)
continue;
« no previous file with comments | « cc/test/layer_test_common.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698