| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |