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 3416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 OverlayCandidateList::iterator it; |
3437 for (it = overlays.begin(); it != overlays.end(); ++it) { | 3437 for (it = overlays.begin(); it != overlays.end(); ++it) { |
danakj
2015/05/04 19:56:41
while you're here.. you could change this to for (
halliwell
2015/05/04 21:38:16
Done.
| |
3438 const OverlayCandidate& overlay = *it; | 3438 const OverlayCandidate& overlay = *it; |
3439 // Skip primary plane. | 3439 // Skip primary plane. |
3440 if (overlay.plane_z_order == 0) | 3440 if (overlay.plane_z_order == 0) |
3441 continue; | 3441 continue; |
3442 | 3442 |
3443 pending_overlay_resources_.push_back( | 3443 pending_overlay_resources_.push_back( |
3444 make_scoped_ptr(new ResourceProvider::ScopedReadLockGL( | 3444 make_scoped_ptr(new ResourceProvider::ScopedReadLockGL( |
3445 resource_provider_, overlay.resource_id))); | 3445 resource_provider_, overlay.resource_id))); |
3446 | 3446 |
3447 gfx::Rect display_rect(ToNearestRect(overlay.display_rect)); | |
danakj
2015/05/04 19:56:41
i don't think the temp var is buying much here it'
halliwell
2015/05/04 21:38:16
yep, done.
| |
3447 context_support_->ScheduleOverlayPlane( | 3448 context_support_->ScheduleOverlayPlane( |
3448 overlay.plane_z_order, | 3449 overlay.plane_z_order, |
3449 overlay.transform, | 3450 overlay.transform, |
3450 pending_overlay_resources_.back()->texture_id(), | 3451 pending_overlay_resources_.back()->texture_id(), |
3451 overlay.display_rect, | 3452 display_rect, |
3452 overlay.uv_rect); | 3453 overlay.uv_rect); |
3453 } | 3454 } |
3454 } | 3455 } |
3455 | 3456 |
3456 } // namespace cc | 3457 } // namespace cc |
OLD | NEW |