| 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 2055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2066 case YUVVideoDrawQuad::JPEG: | 2066 case YUVVideoDrawQuad::JPEG: |
| 2067 yuv_to_rgb = yuv_to_rgb_jpeg; | 2067 yuv_to_rgb = yuv_to_rgb_jpeg; |
| 2068 yuv_adjust = yuv_adjust_full; | 2068 yuv_adjust = yuv_adjust_full; |
| 2069 break; | 2069 break; |
| 2070 } | 2070 } |
| 2071 | 2071 |
| 2072 // The transform and vertex data are used to figure out the extents that the | 2072 // The transform and vertex data are used to figure out the extents that the |
| 2073 // un-antialiased quad should have and which vertex this is and the float | 2073 // un-antialiased quad should have and which vertex this is and the float |
| 2074 // quad passed in via uniform is the actual geometry that gets used to draw | 2074 // quad passed in via uniform is the actual geometry that gets used to draw |
| 2075 // it. This is why this centered rect is used and not the original quad_rect. | 2075 // it. This is why this centered rect is used and not the original quad_rect. |
| 2076 gfx::RectF tile_rect = quad->visible_rect; | 2076 gfx::RectF tile_rect = quad->rect; |
| 2077 GLC(gl_, gl_->UniformMatrix3fv(yuv_matrix_location, 1, 0, yuv_to_rgb)); | 2077 GLC(gl_, gl_->UniformMatrix3fv(yuv_matrix_location, 1, 0, yuv_to_rgb)); |
| 2078 GLC(gl_, gl_->Uniform3fv(yuv_adj_location, 1, yuv_adjust)); | 2078 GLC(gl_, gl_->Uniform3fv(yuv_adj_location, 1, yuv_adjust)); |
| 2079 | 2079 |
| 2080 SetShaderOpacity(quad->opacity(), alpha_location); | 2080 SetShaderOpacity(quad->opacity(), alpha_location); |
| 2081 if (!clip_region) { | 2081 if (!clip_region) { |
| 2082 DrawQuadGeometry(frame, quad->quadTransform(), tile_rect, matrix_location); | 2082 DrawQuadGeometry(frame, quad->quadTransform(), tile_rect, matrix_location); |
| 2083 } else { | 2083 } else { |
| 2084 float uvs[8] = {0}; | 2084 float uvs[8] = {0}; |
| 2085 GetScaledUVs(quad->visible_rect, clip_region, uvs); | 2085 GetScaledUVs(quad->visible_rect, clip_region, uvs); |
| 2086 gfx::QuadF region_quad = *clip_region; | 2086 gfx::QuadF region_quad = *clip_region; |
| (...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3522 context_support_->ScheduleOverlayPlane( | 3522 context_support_->ScheduleOverlayPlane( |
| 3523 overlay.plane_z_order, | 3523 overlay.plane_z_order, |
| 3524 overlay.transform, | 3524 overlay.transform, |
| 3525 pending_overlay_resources_.back()->texture_id(), | 3525 pending_overlay_resources_.back()->texture_id(), |
| 3526 overlay.display_rect, | 3526 overlay.display_rect, |
| 3527 overlay.uv_rect); | 3527 overlay.uv_rect); |
| 3528 } | 3528 } |
| 3529 } | 3529 } |
| 3530 | 3530 |
| 3531 } // namespace cc | 3531 } // namespace cc |
| OLD | NEW |