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 3500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3511 if (!frame->overlay_list.size()) | 3511 if (!frame->overlay_list.size()) |
3512 return; | 3512 return; |
3513 | 3513 |
3514 ResourceProvider::ResourceIdArray resources; | 3514 ResourceProvider::ResourceIdArray resources; |
3515 OverlayCandidateList& overlays = frame->overlay_list; | 3515 OverlayCandidateList& overlays = frame->overlay_list; |
3516 for (const OverlayCandidate& overlay : overlays) { | 3516 for (const OverlayCandidate& overlay : overlays) { |
3517 // Skip primary plane. | 3517 // Skip primary plane. |
3518 if (overlay.plane_z_order == 0) | 3518 if (overlay.plane_z_order == 0) |
3519 continue; | 3519 continue; |
3520 | 3520 |
3521 pending_overlay_resources_.push_back( | 3521 unsigned texture_id = 0; |
3522 make_scoped_ptr(new ResourceProvider::ScopedReadLockGL( | 3522 if (overlay.use_output_surface_for_resource) { |
3523 resource_provider_, overlay.resource_id))); | 3523 texture_id = output_surface_->GetOverlayTextureId(); |
alexst (slow to review)
2015/08/25 18:49:38
DCHECK that this is not 0 because the surface has
ccameron
2015/08/26 21:36:13
Done.
| |
3524 } else { | |
3525 pending_overlay_resources_.push_back( | |
3526 make_scoped_ptr(new ResourceProvider::ScopedReadLockGL( | |
3527 resource_provider_, overlay.resource_id))); | |
3528 texture_id = pending_overlay_resources_.back()->texture_id(); | |
3529 } | |
3524 | 3530 |
3525 context_support_->ScheduleOverlayPlane( | 3531 context_support_->ScheduleOverlayPlane( |
3526 overlay.plane_z_order, | 3532 overlay.plane_z_order, overlay.transform, texture_id, |
3527 overlay.transform, | 3533 ToNearestRect(overlay.display_rect), overlay.uv_rect); |
3528 pending_overlay_resources_.back()->texture_id(), | |
3529 ToNearestRect(overlay.display_rect), | |
3530 overlay.uv_rect); | |
3531 } | 3534 } |
3532 } | 3535 } |
3533 | 3536 |
3534 } // namespace cc | 3537 } // namespace cc |
OLD | NEW |