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

Side by Side Diff: cc/output/gl_renderer.cc

Issue 448303002: Use custom ListContainer to allocate DrawQuads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@perftest
Patch Set: fix win trybot 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 unified diff | Download patch
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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/output/gl_renderer.h" 5 #include "cc/output/gl_renderer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 } 460 }
461 resource_provider_->SetReadLockFence(read_lock_fence.get()); 461 resource_provider_->SetReadLockFence(read_lock_fence.get());
462 462
463 // Insert WaitSyncPointCHROMIUM on quad resources prior to drawing the frame, 463 // Insert WaitSyncPointCHROMIUM on quad resources prior to drawing the frame,
464 // so that drawing can proceed without GL context switching interruptions. 464 // so that drawing can proceed without GL context switching interruptions.
465 DrawQuad::ResourceIteratorCallback wait_on_resource_syncpoints_callback = 465 DrawQuad::ResourceIteratorCallback wait_on_resource_syncpoints_callback =
466 base::Bind(&WaitOnResourceSyncPoints, resource_provider_); 466 base::Bind(&WaitOnResourceSyncPoints, resource_provider_);
467 467
468 for (size_t i = 0; i < frame->render_passes_in_draw_order->size(); ++i) { 468 for (size_t i = 0; i < frame->render_passes_in_draw_order->size(); ++i) {
469 RenderPass* pass = frame->render_passes_in_draw_order->at(i); 469 RenderPass* pass = frame->render_passes_in_draw_order->at(i);
470 for (size_t j = 0; j < pass->quad_list.size(); ++j) { 470 for (QuadList::Iterator iter = pass->quad_list.begin();
471 DrawQuad* quad = pass->quad_list[j]; 471 iter != pass->quad_list.end();
472 quad->IterateResources(wait_on_resource_syncpoints_callback); 472 ++iter) {
473 iter->IterateResources(wait_on_resource_syncpoints_callback);
473 } 474 }
474 } 475 }
475 476
476 // TODO(enne): Do we need to reinitialize all of this state per frame? 477 // TODO(enne): Do we need to reinitialize all of this state per frame?
477 ReinitializeGLState(); 478 ReinitializeGLState();
478 } 479 }
479 480
480 void GLRenderer::DoNoOp() { 481 void GLRenderer::DoNoOp() {
481 GLC(gl_, gl_->BindFramebuffer(GL_FRAMEBUFFER, 0)); 482 GLC(gl_, gl_->BindFramebuffer(GL_FRAMEBUFFER, 0));
482 GLC(gl_, gl_->Flush()); 483 GLC(gl_, gl_->Flush());
(...skipping 2699 matching lines...) Expand 10 before | Expand all | Expand 10 after
3182 context_support_->ScheduleOverlayPlane( 3183 context_support_->ScheduleOverlayPlane(
3183 overlay.plane_z_order, 3184 overlay.plane_z_order,
3184 overlay.transform, 3185 overlay.transform,
3185 pending_overlay_resources_.back()->texture_id(), 3186 pending_overlay_resources_.back()->texture_id(),
3186 overlay.display_rect, 3187 overlay.display_rect,
3187 overlay.uv_rect); 3188 overlay.uv_rect);
3188 } 3189 }
3189 } 3190 }
3190 3191
3191 } // namespace cc 3192 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698