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 3642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3653 ca_layer_overlay.bounds_rect.height(), | 3653 ca_layer_overlay.bounds_rect.height(), |
3654 }; | 3654 }; |
3655 GLboolean is_clipped = ca_layer_overlay.is_clipped; | 3655 GLboolean is_clipped = ca_layer_overlay.is_clipped; |
3656 GLfloat clip_rect[4] = {ca_layer_overlay.clip_rect.x(), | 3656 GLfloat clip_rect[4] = {ca_layer_overlay.clip_rect.x(), |
3657 ca_layer_overlay.clip_rect.y(), | 3657 ca_layer_overlay.clip_rect.y(), |
3658 ca_layer_overlay.clip_rect.width(), | 3658 ca_layer_overlay.clip_rect.width(), |
3659 ca_layer_overlay.clip_rect.height()}; | 3659 ca_layer_overlay.clip_rect.height()}; |
3660 GLint sorting_context_id = ca_layer_overlay.sorting_context_id; | 3660 GLint sorting_context_id = ca_layer_overlay.sorting_context_id; |
3661 GLfloat transform[16]; | 3661 GLfloat transform[16]; |
3662 ca_layer_overlay.transform.asColMajorf(transform); | 3662 ca_layer_overlay.transform.asColMajorf(transform); |
3663 unsigned filter = GL_LINEAR; | 3663 unsigned filter = ca_layer_overlay.filter; |
3664 gl_->ScheduleCALayerCHROMIUM( | 3664 gl_->ScheduleCALayerCHROMIUM( |
3665 texture_id, contents_rect, ca_layer_overlay.opacity, | 3665 texture_id, contents_rect, ca_layer_overlay.opacity, |
3666 ca_layer_overlay.background_color, ca_layer_overlay.edge_aa_mask, | 3666 ca_layer_overlay.background_color, ca_layer_overlay.edge_aa_mask, |
3667 bounds_rect, is_clipped, clip_rect, sorting_context_id, transform, | 3667 bounds_rect, is_clipped, clip_rect, sorting_context_id, transform, |
3668 filter); | 3668 filter); |
3669 } | 3669 } |
3670 } | 3670 } |
3671 | 3671 |
3672 void GLRenderer::ScheduleOverlays(DrawingFrame* frame) { | 3672 void GLRenderer::ScheduleOverlays(DrawingFrame* frame) { |
3673 if (frame->overlay_list.empty()) | 3673 if (frame->overlay_list.empty()) |
(...skipping 12 matching lines...) Expand all Loading... |
3686 texture_id = pending_overlay_resources_.back()->texture_id(); | 3686 texture_id = pending_overlay_resources_.back()->texture_id(); |
3687 } | 3687 } |
3688 | 3688 |
3689 context_support_->ScheduleOverlayPlane( | 3689 context_support_->ScheduleOverlayPlane( |
3690 overlay.plane_z_order, overlay.transform, texture_id, | 3690 overlay.plane_z_order, overlay.transform, texture_id, |
3691 ToNearestRect(overlay.display_rect), overlay.uv_rect); | 3691 ToNearestRect(overlay.display_rect), overlay.uv_rect); |
3692 } | 3692 } |
3693 } | 3693 } |
3694 | 3694 |
3695 } // namespace cc | 3695 } // namespace cc |
OLD | NEW |