| 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 3516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3527 | 3527 |
| 3528 void GLRenderer::ScheduleOverlays(DrawingFrame* frame) { | 3528 void GLRenderer::ScheduleOverlays(DrawingFrame* frame) { |
| 3529 if (!frame->overlay_list.size()) | 3529 if (!frame->overlay_list.size()) |
| 3530 return; | 3530 return; |
| 3531 | 3531 |
| 3532 OverlayCandidateList& overlays = frame->overlay_list; | 3532 OverlayCandidateList& overlays = frame->overlay_list; |
| 3533 for (const OverlayCandidate& overlay : overlays) { | 3533 for (const OverlayCandidate& overlay : overlays) { |
| 3534 unsigned texture_id = 0; | 3534 unsigned texture_id = 0; |
| 3535 if (overlay.use_output_surface_for_resource) { | 3535 if (overlay.use_output_surface_for_resource) { |
| 3536 texture_id = output_surface_->GetOverlayTextureId(); | 3536 texture_id = output_surface_->GetOverlayTextureId(); |
| 3537 DCHECK_IMPLIES(!texture_id, IsContextLost()); | 3537 DCHECK(texture_id || IsContextLost()); |
| 3538 } else { | 3538 } else { |
| 3539 pending_overlay_resources_.push_back( | 3539 pending_overlay_resources_.push_back( |
| 3540 make_scoped_ptr(new ResourceProvider::ScopedReadLockGL( | 3540 make_scoped_ptr(new ResourceProvider::ScopedReadLockGL( |
| 3541 resource_provider_, overlay.resource_id))); | 3541 resource_provider_, overlay.resource_id))); |
| 3542 texture_id = pending_overlay_resources_.back()->texture_id(); | 3542 texture_id = pending_overlay_resources_.back()->texture_id(); |
| 3543 } | 3543 } |
| 3544 | 3544 |
| 3545 context_support_->ScheduleOverlayPlane( | 3545 context_support_->ScheduleOverlayPlane( |
| 3546 overlay.plane_z_order, overlay.transform, texture_id, | 3546 overlay.plane_z_order, overlay.transform, texture_id, |
| 3547 ToNearestRect(overlay.display_rect), overlay.uv_rect); | 3547 ToNearestRect(overlay.display_rect), overlay.uv_rect); |
| 3548 } | 3548 } |
| 3549 } | 3549 } |
| 3550 | 3550 |
| 3551 } // namespace cc | 3551 } // namespace cc |
| OLD | NEW |