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

Unified Diff: cc/surfaces/surface_aggregator.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/quads/render_pass_unittest.cc ('k') | cc/surfaces/surface_aggregator_test_helpers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_aggregator.cc
diff --git a/cc/surfaces/surface_aggregator.cc b/cc/surfaces/surface_aggregator.cc
index 96878da22e491f5cc2faf9fda61f86547894c04e..679d7516b621030e8f5156d72b8df9ce7adc22a2 100644
--- a/cc/surfaces/surface_aggregator.cc
+++ b/cc/surfaces/surface_aggregator.cc
@@ -128,10 +128,10 @@ bool SurfaceAggregator::TakeResources(Surface* surface,
it != render_pass_list->end();
++it) {
QuadList& quad_list = (*it)->quad_list;
- for (QuadList::iterator quad_it = quad_list.begin();
+ for (QuadList::Iterator quad_it = quad_list.begin();
quad_it != quad_list.end();
++quad_it) {
- (*quad_it)->IterateResources(remap);
+ quad_it->IterateResources(remap);
}
}
if (!invalid_frame)
@@ -234,7 +234,8 @@ void SurfaceAggregator::HandleSurfaceQuad(const SurfaceDrawQuad* surface_quad,
SharedQuadState* shared_quad_state =
dest_pass->CreateAndAppendSharedQuadState();
shared_quad_state->CopyFrom(surface_quad->shared_quad_state);
- scoped_ptr<RenderPassDrawQuad> quad(new RenderPassDrawQuad);
+ RenderPassDrawQuad* quad =
+ dest_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>();
quad->SetNew(shared_quad_state,
surface_quad->rect,
surface_quad->visible_rect,
@@ -244,7 +245,6 @@ void SurfaceAggregator::HandleSurfaceQuad(const SurfaceDrawQuad* surface_quad,
FilterOperations(),
gfx::Vector2dF(),
FilterOperations());
- dest_pass->quad_list.push_back(quad.PassAs<DrawQuad>());
}
dest_pass->damage_rect =
gfx::UnionRects(dest_pass->damage_rect,
@@ -284,8 +284,11 @@ void SurfaceAggregator::CopyQuadsToPass(
SurfaceId surface_id) {
const SharedQuadState* last_copied_source_shared_quad_state = NULL;
- for (size_t i = 0, sqs_i = 0; i < source_quad_list.size(); ++i) {
- DrawQuad* quad = source_quad_list[i];
+ size_t sqs_i = 0;
+ for (QuadList::ConstIterator iter = source_quad_list.begin();
+ iter != source_quad_list.end();
+ ++iter) {
+ const DrawQuad* quad = &*iter;
while (quad->shared_quad_state != source_shared_quad_state_list[sqs_i]) {
++sqs_i;
DCHECK_LT(sqs_i, source_shared_quad_state_list.size());
« no previous file with comments | « cc/quads/render_pass_unittest.cc ('k') | cc/surfaces/surface_aggregator_test_helpers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698