| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 3631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3642 GLfloat contents_rect[4] = { | 3642 GLfloat contents_rect[4] = { |
| 3643 ca_layer_overlay.contents_rect.x(), ca_layer_overlay.contents_rect.y(), | 3643 ca_layer_overlay.contents_rect.x(), ca_layer_overlay.contents_rect.y(), |
| 3644 ca_layer_overlay.contents_rect.width(), | 3644 ca_layer_overlay.contents_rect.width(), |
| 3645 ca_layer_overlay.contents_rect.height(), | 3645 ca_layer_overlay.contents_rect.height(), |
| 3646 }; | 3646 }; |
| 3647 GLfloat bounds_rect[4] = { | 3647 GLfloat bounds_rect[4] = { |
| 3648 ca_layer_overlay.bounds_rect.x(), ca_layer_overlay.bounds_rect.y(), | 3648 ca_layer_overlay.bounds_rect.x(), ca_layer_overlay.bounds_rect.y(), |
| 3649 ca_layer_overlay.bounds_rect.width(), | 3649 ca_layer_overlay.bounds_rect.width(), |
| 3650 ca_layer_overlay.bounds_rect.height(), | 3650 ca_layer_overlay.bounds_rect.height(), |
| 3651 }; | 3651 }; |
| 3652 GLboolean is_clipped = ca_layer_overlay.is_clipped; | 3652 GLboolean is_clipped = ca_layer_overlay.shared_state->is_clipped; |
| 3653 GLfloat clip_rect[4] = {ca_layer_overlay.clip_rect.x(), | 3653 GLfloat clip_rect[4] = {ca_layer_overlay.shared_state->clip_rect.x(), |
| 3654 ca_layer_overlay.clip_rect.y(), | 3654 ca_layer_overlay.shared_state->clip_rect.y(), |
| 3655 ca_layer_overlay.clip_rect.width(), | 3655 ca_layer_overlay.shared_state->clip_rect.width(), |
| 3656 ca_layer_overlay.clip_rect.height()}; | 3656 ca_layer_overlay.shared_state->clip_rect.height()}; |
| 3657 GLint sorting_context_id = ca_layer_overlay.sorting_context_id; | 3657 GLint sorting_context_id = |
| 3658 ca_layer_overlay.shared_state->sorting_context_id; |
| 3658 GLfloat transform[16]; | 3659 GLfloat transform[16]; |
| 3659 ca_layer_overlay.transform.asColMajorf(transform); | 3660 ca_layer_overlay.shared_state->transform.asColMajorf(transform); |
| 3660 unsigned filter = ca_layer_overlay.filter; | 3661 unsigned filter = ca_layer_overlay.filter; |
| 3661 gl_->ScheduleCALayerCHROMIUM( | 3662 gl_->ScheduleCALayerCHROMIUM( |
| 3662 texture_id, contents_rect, ca_layer_overlay.opacity, | 3663 texture_id, contents_rect, ca_layer_overlay.shared_state->opacity, |
| 3663 ca_layer_overlay.background_color, ca_layer_overlay.edge_aa_mask, | 3664 ca_layer_overlay.background_color, ca_layer_overlay.edge_aa_mask, |
| 3664 bounds_rect, is_clipped, clip_rect, sorting_context_id, transform, | 3665 bounds_rect, is_clipped, clip_rect, sorting_context_id, transform, |
| 3665 filter); | 3666 filter); |
| 3666 } | 3667 } |
| 3667 } | 3668 } |
| 3668 | 3669 |
| 3669 void GLRenderer::ScheduleOverlays(DrawingFrame* frame) { | 3670 void GLRenderer::ScheduleOverlays(DrawingFrame* frame) { |
| 3670 if (frame->overlay_list.empty()) | 3671 if (frame->overlay_list.empty()) |
| 3671 return; | 3672 return; |
| 3672 | 3673 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 3683 texture_id = pending_overlay_resources_.back()->texture_id(); | 3684 texture_id = pending_overlay_resources_.back()->texture_id(); |
| 3684 } | 3685 } |
| 3685 | 3686 |
| 3686 context_support_->ScheduleOverlayPlane( | 3687 context_support_->ScheduleOverlayPlane( |
| 3687 overlay.plane_z_order, overlay.transform, texture_id, | 3688 overlay.plane_z_order, overlay.transform, texture_id, |
| 3688 ToNearestRect(overlay.display_rect), overlay.uv_rect); | 3689 ToNearestRect(overlay.display_rect), overlay.uv_rect); |
| 3689 } | 3690 } |
| 3690 } | 3691 } |
| 3691 | 3692 |
| 3692 } // namespace cc | 3693 } // namespace cc |
| OLD | NEW |