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 3504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3515 if (!frame->overlay_list.size()) | 3515 if (!frame->overlay_list.size()) |
3516 return; | 3516 return; |
3517 | 3517 |
3518 ResourceProvider::ResourceIdArray resources; | 3518 ResourceProvider::ResourceIdArray resources; |
3519 OverlayCandidateList& overlays = frame->overlay_list; | 3519 OverlayCandidateList& overlays = frame->overlay_list; |
3520 for (const OverlayCandidate& overlay : overlays) { | 3520 for (const OverlayCandidate& overlay : overlays) { |
3521 // Skip primary plane. | 3521 // Skip primary plane. |
3522 if (overlay.plane_z_order == 0) | 3522 if (overlay.plane_z_order == 0) |
3523 continue; | 3523 continue; |
3524 | 3524 |
3525 pending_overlay_resources_.push_back( | 3525 unsigned texture_id = 0; |
ccameron
2015/08/23 21:29:05
This is the bit where we pull the texture out from
alexst (slow to review)
2015/08/24 15:07:02
Some background. In theory, we could have overlays
| |
3526 make_scoped_ptr(new ResourceProvider::ScopedReadLockGL( | 3526 if (overlay.use_output_surface_for_resource) { |
3527 resource_provider_, overlay.resource_id))); | 3527 texture_id = output_surface_->GetOverlayTextureId(); |
3528 } else { | |
3529 pending_overlay_resources_.push_back( | |
3530 make_scoped_ptr(new ResourceProvider::ScopedReadLockGL( | |
3531 resource_provider_, overlay.resource_id))); | |
3532 texture_id = pending_overlay_resources_.back()->texture_id(); | |
3533 } | |
3528 | 3534 |
3529 context_support_->ScheduleOverlayPlane( | 3535 context_support_->ScheduleOverlayPlane( |
3530 overlay.plane_z_order, | 3536 overlay.plane_z_order, overlay.transform, texture_id, |
3531 overlay.transform, | 3537 ToNearestRect(overlay.display_rect), overlay.uv_rect); |
3532 pending_overlay_resources_.back()->texture_id(), | |
3533 ToNearestRect(overlay.display_rect), | |
3534 overlay.uv_rect); | |
3535 } | 3538 } |
3536 } | 3539 } |
3537 | 3540 |
3538 } // namespace cc | 3541 } // namespace cc |
OLD | NEW |