Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Side by Side Diff: cc/output/gl_renderer.cc

Issue 2628183002: The great shader refactor: Add YUV support to the uber shader (Closed)
Patch Set: Rebase Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | cc/output/gl_renderer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2130 matching lines...) Expand 10 before | Expand all | Expand 10 after
2141 int v_texture_location = -1; 2141 int v_texture_location = -1;
2142 int uv_texture_location = -1; 2142 int uv_texture_location = -1;
2143 int a_texture_location = -1; 2143 int a_texture_location = -1;
2144 int lut_texture_location = -1; 2144 int lut_texture_location = -1;
2145 int yuv_matrix_location = -1; 2145 int yuv_matrix_location = -1;
2146 int yuv_adj_location = -1; 2146 int yuv_adj_location = -1;
2147 int alpha_location = -1; 2147 int alpha_location = -1;
2148 int resource_multiplier_location = -1; 2148 int resource_multiplier_location = -1;
2149 int resource_offset_location = -1; 2149 int resource_offset_location = -1;
2150 const Program* program = GetProgram(ProgramKey::YUVVideo( 2150 const Program* program = GetProgram(ProgramKey::YUVVideo(
2151 tex_coord_precision, sampler, use_alpha_plane, use_nv12, use_color_lut)); 2151 tex_coord_precision, sampler,
2152 use_alpha_plane ? YUV_HAS_ALPHA_TEXTURE : YUV_NO_ALPHA_TEXTURE,
2153 use_nv12 ? UV_TEXTURE_MODE_UV : UV_TEXTURE_MODE_U_V,
2154 use_color_lut ? COLOR_CONVERSION_MODE_2D_LUT_AS_3D_FROM_YUV
2155 : COLOR_CONVERSION_MODE_NONE));
2152 DCHECK(program && (program->initialized() || IsContextLost())); 2156 DCHECK(program && (program->initialized() || IsContextLost()));
2153 SetUseProgram(program->program()); 2157 SetUseProgram(program->program());
2154 matrix_location = program->matrix_location(); 2158 matrix_location = program->matrix_location();
2155 ya_tex_scale_location = program->ya_tex_scale_location(); 2159 ya_tex_scale_location = program->ya_tex_scale_location();
2156 ya_tex_offset_location = program->ya_tex_offset_location(); 2160 ya_tex_offset_location = program->ya_tex_offset_location();
2157 uv_tex_scale_location = program->uv_tex_scale_location(); 2161 uv_tex_scale_location = program->uv_tex_scale_location();
2158 uv_tex_offset_location = program->uv_tex_offset_location(); 2162 uv_tex_offset_location = program->uv_tex_offset_location();
2159 y_texture_location = program->y_texture_location(); 2163 y_texture_location = program->y_texture_location();
2160 u_texture_location = program->u_texture_location(); 2164 u_texture_location = program->u_texture_location();
2161 v_texture_location = program->v_texture_location(); 2165 v_texture_location = program->v_texture_location();
(...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after
3465 // The alpha has already been applied when copying the RPDQ to an IOSurface. 3469 // The alpha has already been applied when copying the RPDQ to an IOSurface.
3466 GLfloat alpha = 1; 3470 GLfloat alpha = 1;
3467 gl_->ScheduleCALayerSharedStateCHROMIUM(alpha, is_clipped, clip_rect, 3471 gl_->ScheduleCALayerSharedStateCHROMIUM(alpha, is_clipped, clip_rect,
3468 sorting_context_id, gl_transform); 3472 sorting_context_id, gl_transform);
3469 gl_->ScheduleCALayerCHROMIUM( 3473 gl_->ScheduleCALayerCHROMIUM(
3470 texture_id, contents_rect, ca_layer_overlay->background_color, 3474 texture_id, contents_rect, ca_layer_overlay->background_color,
3471 ca_layer_overlay->edge_aa_mask, bounds_rect, filter); 3475 ca_layer_overlay->edge_aa_mask, bounds_rect, filter);
3472 } 3476 }
3473 3477
3474 } // namespace cc 3478 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/output/gl_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698