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 3415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3426 bool GLRenderer::IsContextLost() { | 3426 bool GLRenderer::IsContextLost() { |
3427 return output_surface_->context_provider()->IsContextLost(); | 3427 return output_surface_->context_provider()->IsContextLost(); |
3428 } | 3428 } |
3429 | 3429 |
3430 void GLRenderer::ScheduleOverlays(DrawingFrame* frame) { | 3430 void GLRenderer::ScheduleOverlays(DrawingFrame* frame) { |
3431 if (!frame->overlay_list.size()) | 3431 if (!frame->overlay_list.size()) |
3432 return; | 3432 return; |
3433 | 3433 |
3434 ResourceProvider::ResourceIdArray resources; | 3434 ResourceProvider::ResourceIdArray resources; |
3435 OverlayCandidateList& overlays = frame->overlay_list; | 3435 OverlayCandidateList& overlays = frame->overlay_list; |
3436 OverlayCandidateList::iterator it; | 3436 for (const OverlayCandidate& overlay : overlays) { |
3437 for (it = overlays.begin(); it != overlays.end(); ++it) { | |
3438 const OverlayCandidate& overlay = *it; | |
3439 // Skip primary plane. | 3437 // Skip primary plane. |
3440 if (overlay.plane_z_order == 0) | 3438 if (overlay.plane_z_order == 0) |
3441 continue; | 3439 continue; |
3442 | 3440 |
3443 pending_overlay_resources_.push_back( | 3441 pending_overlay_resources_.push_back( |
3444 make_scoped_ptr(new ResourceProvider::ScopedReadLockGL( | 3442 make_scoped_ptr(new ResourceProvider::ScopedReadLockGL( |
3445 resource_provider_, overlay.resource_id))); | 3443 resource_provider_, overlay.resource_id))); |
3446 | 3444 |
3447 context_support_->ScheduleOverlayPlane( | 3445 context_support_->ScheduleOverlayPlane( |
3448 overlay.plane_z_order, | 3446 overlay.plane_z_order, |
3449 overlay.transform, | 3447 overlay.transform, |
3450 pending_overlay_resources_.back()->texture_id(), | 3448 pending_overlay_resources_.back()->texture_id(), |
3451 overlay.display_rect, | 3449 ToNearestRect(overlay.display_rect), |
3452 overlay.uv_rect); | 3450 overlay.uv_rect); |
3453 } | 3451 } |
3454 } | 3452 } |
3455 | 3453 |
3456 } // namespace cc | 3454 } // namespace cc |
OLD | NEW |