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 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1207 int shader_mask_tex_coord_scale_location = -1; | 1207 int shader_mask_tex_coord_scale_location = -1; |
1208 int shader_mask_tex_coord_offset_location = -1; | 1208 int shader_mask_tex_coord_offset_location = -1; |
1209 int shader_matrix_location = -1; | 1209 int shader_matrix_location = -1; |
1210 int shader_alpha_location = -1; | 1210 int shader_alpha_location = -1; |
1211 int shader_color_matrix_location = -1; | 1211 int shader_color_matrix_location = -1; |
1212 int shader_color_offset_location = -1; | 1212 int shader_color_offset_location = -1; |
1213 int shader_tex_transform_location = -1; | 1213 int shader_tex_transform_location = -1; |
1214 | 1214 |
1215 if (use_aa && mask_texture_id && !use_color_matrix) { | 1215 if (use_aa && mask_texture_id && !use_color_matrix) { |
1216 const RenderPassMaskProgramAA* program = | 1216 const RenderPassMaskProgramAA* program = |
1217 GetRenderPassMaskProgramAA(tex_coord_precision); | 1217 GetRenderPassMaskProgramAA(tex_coord_precision, mask_sampler); |
1218 SetUseProgram(program->program()); | 1218 SetUseProgram(program->program()); |
1219 GLC(gl_, gl_->Uniform1i(program->fragment_shader().sampler_location(), 0)); | 1219 GLC(gl_, gl_->Uniform1i(program->fragment_shader().sampler_location(), 0)); |
1220 | 1220 |
1221 shader_quad_location = program->vertex_shader().quad_location(); | 1221 shader_quad_location = program->vertex_shader().quad_location(); |
1222 shader_edge_location = program->vertex_shader().edge_location(); | 1222 shader_edge_location = program->vertex_shader().edge_location(); |
1223 shader_viewport_location = program->vertex_shader().viewport_location(); | 1223 shader_viewport_location = program->vertex_shader().viewport_location(); |
1224 shader_mask_sampler_location = | 1224 shader_mask_sampler_location = |
1225 program->fragment_shader().mask_sampler_location(); | 1225 program->fragment_shader().mask_sampler_location(); |
1226 shader_mask_tex_coord_scale_location = | 1226 shader_mask_tex_coord_scale_location = |
1227 program->fragment_shader().mask_tex_coord_scale_location(); | 1227 program->fragment_shader().mask_tex_coord_scale_location(); |
1228 shader_mask_tex_coord_offset_location = | 1228 shader_mask_tex_coord_offset_location = |
1229 program->fragment_shader().mask_tex_coord_offset_location(); | 1229 program->fragment_shader().mask_tex_coord_offset_location(); |
1230 shader_matrix_location = program->vertex_shader().matrix_location(); | 1230 shader_matrix_location = program->vertex_shader().matrix_location(); |
1231 shader_alpha_location = program->fragment_shader().alpha_location(); | 1231 shader_alpha_location = program->fragment_shader().alpha_location(); |
1232 shader_tex_transform_location = | 1232 shader_tex_transform_location = |
1233 program->vertex_shader().tex_transform_location(); | 1233 program->vertex_shader().tex_transform_location(); |
1234 } else if (!use_aa && mask_texture_id && !use_color_matrix) { | 1234 } else if (!use_aa && mask_texture_id && !use_color_matrix) { |
1235 const RenderPassMaskProgram* program = | 1235 const RenderPassMaskProgram* program = |
1236 GetRenderPassMaskProgram(tex_coord_precision); | 1236 GetRenderPassMaskProgram(tex_coord_precision, mask_sampler); |
1237 SetUseProgram(program->program()); | 1237 SetUseProgram(program->program()); |
1238 GLC(gl_, gl_->Uniform1i(program->fragment_shader().sampler_location(), 0)); | 1238 GLC(gl_, gl_->Uniform1i(program->fragment_shader().sampler_location(), 0)); |
1239 | 1239 |
1240 shader_mask_sampler_location = | 1240 shader_mask_sampler_location = |
1241 program->fragment_shader().mask_sampler_location(); | 1241 program->fragment_shader().mask_sampler_location(); |
1242 shader_mask_tex_coord_scale_location = | 1242 shader_mask_tex_coord_scale_location = |
1243 program->fragment_shader().mask_tex_coord_scale_location(); | 1243 program->fragment_shader().mask_tex_coord_scale_location(); |
1244 shader_mask_tex_coord_offset_location = | 1244 shader_mask_tex_coord_offset_location = |
1245 program->fragment_shader().mask_tex_coord_offset_location(); | 1245 program->fragment_shader().mask_tex_coord_offset_location(); |
1246 shader_matrix_location = program->vertex_shader().matrix_location(); | 1246 shader_matrix_location = program->vertex_shader().matrix_location(); |
1247 shader_alpha_location = program->fragment_shader().alpha_location(); | 1247 shader_alpha_location = program->fragment_shader().alpha_location(); |
1248 shader_tex_transform_location = | 1248 shader_tex_transform_location = |
1249 program->vertex_shader().tex_transform_location(); | 1249 program->vertex_shader().tex_transform_location(); |
1250 } else if (use_aa && !mask_texture_id && !use_color_matrix) { | 1250 } else if (use_aa && !mask_texture_id && !use_color_matrix) { |
1251 const RenderPassProgramAA* program = | 1251 const RenderPassProgramAA* program = |
1252 GetRenderPassProgramAA(tex_coord_precision); | 1252 GetRenderPassProgramAA(tex_coord_precision); |
1253 SetUseProgram(program->program()); | 1253 SetUseProgram(program->program()); |
1254 GLC(gl_, gl_->Uniform1i(program->fragment_shader().sampler_location(), 0)); | 1254 GLC(gl_, gl_->Uniform1i(program->fragment_shader().sampler_location(), 0)); |
1255 | 1255 |
1256 shader_quad_location = program->vertex_shader().quad_location(); | 1256 shader_quad_location = program->vertex_shader().quad_location(); |
1257 shader_edge_location = program->vertex_shader().edge_location(); | 1257 shader_edge_location = program->vertex_shader().edge_location(); |
1258 shader_viewport_location = program->vertex_shader().viewport_location(); | 1258 shader_viewport_location = program->vertex_shader().viewport_location(); |
1259 shader_matrix_location = program->vertex_shader().matrix_location(); | 1259 shader_matrix_location = program->vertex_shader().matrix_location(); |
1260 shader_alpha_location = program->fragment_shader().alpha_location(); | 1260 shader_alpha_location = program->fragment_shader().alpha_location(); |
1261 shader_tex_transform_location = | 1261 shader_tex_transform_location = |
1262 program->vertex_shader().tex_transform_location(); | 1262 program->vertex_shader().tex_transform_location(); |
1263 } else if (use_aa && mask_texture_id && use_color_matrix) { | 1263 } else if (use_aa && mask_texture_id && use_color_matrix) { |
1264 const RenderPassMaskColorMatrixProgramAA* program = | 1264 const RenderPassMaskColorMatrixProgramAA* program = |
1265 GetRenderPassMaskColorMatrixProgramAA(tex_coord_precision); | 1265 GetRenderPassMaskColorMatrixProgramAA(tex_coord_precision, |
1266 mask_sampler); | |
1266 SetUseProgram(program->program()); | 1267 SetUseProgram(program->program()); |
1267 GLC(gl_, gl_->Uniform1i(program->fragment_shader().sampler_location(), 0)); | 1268 GLC(gl_, gl_->Uniform1i(program->fragment_shader().sampler_location(), 0)); |
1268 | 1269 |
1269 shader_matrix_location = program->vertex_shader().matrix_location(); | 1270 shader_matrix_location = program->vertex_shader().matrix_location(); |
1270 shader_quad_location = program->vertex_shader().quad_location(); | 1271 shader_quad_location = program->vertex_shader().quad_location(); |
1271 shader_tex_transform_location = | 1272 shader_tex_transform_location = |
1272 program->vertex_shader().tex_transform_location(); | 1273 program->vertex_shader().tex_transform_location(); |
1273 shader_edge_location = program->vertex_shader().edge_location(); | 1274 shader_edge_location = program->vertex_shader().edge_location(); |
1274 shader_viewport_location = program->vertex_shader().viewport_location(); | 1275 shader_viewport_location = program->vertex_shader().viewport_location(); |
1275 shader_alpha_location = program->fragment_shader().alpha_location(); | 1276 shader_alpha_location = program->fragment_shader().alpha_location(); |
(...skipping 19 matching lines...) Expand all Loading... | |
1295 program->vertex_shader().tex_transform_location(); | 1296 program->vertex_shader().tex_transform_location(); |
1296 shader_edge_location = program->vertex_shader().edge_location(); | 1297 shader_edge_location = program->vertex_shader().edge_location(); |
1297 shader_viewport_location = program->vertex_shader().viewport_location(); | 1298 shader_viewport_location = program->vertex_shader().viewport_location(); |
1298 shader_alpha_location = program->fragment_shader().alpha_location(); | 1299 shader_alpha_location = program->fragment_shader().alpha_location(); |
1299 shader_color_matrix_location = | 1300 shader_color_matrix_location = |
1300 program->fragment_shader().color_matrix_location(); | 1301 program->fragment_shader().color_matrix_location(); |
1301 shader_color_offset_location = | 1302 shader_color_offset_location = |
1302 program->fragment_shader().color_offset_location(); | 1303 program->fragment_shader().color_offset_location(); |
1303 } else if (!use_aa && mask_texture_id && use_color_matrix) { | 1304 } else if (!use_aa && mask_texture_id && use_color_matrix) { |
1304 const RenderPassMaskColorMatrixProgram* program = | 1305 const RenderPassMaskColorMatrixProgram* program = |
1305 GetRenderPassMaskColorMatrixProgram(tex_coord_precision); | 1306 GetRenderPassMaskColorMatrixProgram(tex_coord_precision, mask_sampler); |
1306 SetUseProgram(program->program()); | 1307 SetUseProgram(program->program()); |
1307 GLC(gl_, gl_->Uniform1i(program->fragment_shader().sampler_location(), 0)); | 1308 GLC(gl_, gl_->Uniform1i(program->fragment_shader().sampler_location(), 0)); |
1308 | 1309 |
1309 shader_matrix_location = program->vertex_shader().matrix_location(); | 1310 shader_matrix_location = program->vertex_shader().matrix_location(); |
1310 shader_tex_transform_location = | 1311 shader_tex_transform_location = |
1311 program->vertex_shader().tex_transform_location(); | 1312 program->vertex_shader().tex_transform_location(); |
1312 shader_mask_sampler_location = | 1313 shader_mask_sampler_location = |
1313 program->fragment_shader().mask_sampler_location(); | 1314 program->fragment_shader().mask_sampler_location(); |
1314 shader_mask_tex_coord_scale_location = | 1315 shader_mask_tex_coord_scale_location = |
1315 program->fragment_shader().mask_tex_coord_scale_location(); | 1316 program->fragment_shader().mask_tex_coord_scale_location(); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1356 // Flip the content vertically in the shader, as the RenderPass input | 1357 // Flip the content vertically in the shader, as the RenderPass input |
1357 // texture is already oriented the same way as the framebuffer, but the | 1358 // texture is already oriented the same way as the framebuffer, but the |
1358 // projection transform does a flip. | 1359 // projection transform does a flip. |
1359 GLC(gl_, | 1360 GLC(gl_, |
1360 gl_->Uniform4f(shader_tex_transform_location, | 1361 gl_->Uniform4f(shader_tex_transform_location, |
1361 0.0f, | 1362 0.0f, |
1362 tex_scale_y, | 1363 tex_scale_y, |
1363 tex_scale_x, | 1364 tex_scale_x, |
1364 -tex_scale_y)); | 1365 -tex_scale_y)); |
1365 | 1366 |
1366 scoped_ptr<ResourceProvider::ScopedSamplerGL> shader_mask_sampler_lock; | |
1367 if (shader_mask_sampler_location != -1) { | 1367 if (shader_mask_sampler_location != -1) { |
1368 DCHECK_NE(shader_mask_tex_coord_scale_location, 1); | 1368 DCHECK_NE(shader_mask_tex_coord_scale_location, 1); |
1369 DCHECK_NE(shader_mask_tex_coord_offset_location, 1); | 1369 DCHECK_NE(shader_mask_tex_coord_offset_location, 1); |
1370 DCHECK_EQ(SamplerType2D, mask_sampler); | |
1371 GLC(gl_, gl_->Uniform1i(shader_mask_sampler_location, 1)); | 1370 GLC(gl_, gl_->Uniform1i(shader_mask_sampler_location, 1)); |
1372 | 1371 |
1373 gfx::RectF mask_uv_rect = quad->MaskUVRect(); | 1372 gfx::RectF mask_uv_rect = quad->MaskUVRect(); |
1373 if (mask_sampler == SamplerType2DRect) { | |
reveman
2014/10/22 12:40:38
sampler != SamplerType2DRect? or how is GL_TEXTURE
enne (OOO)
2014/10/22 19:20:44
Ack. Thanks for pointing out that I had not thoug
reveman
2014/10/22 20:36:47
It's used on Android. It's the only supported targ
| |
1374 mask_uv_rect.Scale(quad->mask_texture_size.width(), | |
1375 quad->mask_texture_size.height()); | |
1376 } | |
1374 | 1377 |
1375 // Mask textures are oriented vertically flipped relative to the framebuffer | 1378 // Mask textures are oriented vertically flipped relative to the framebuffer |
1376 // and the RenderPass contents texture, so we flip the tex coords from the | 1379 // and the RenderPass contents texture, so we flip the tex coords from the |
1377 // RenderPass texture to find the mask texture coords. | 1380 // RenderPass texture to find the mask texture coords. |
1378 GLC(gl_, | 1381 GLC(gl_, |
1379 gl_->Uniform2f(shader_mask_tex_coord_offset_location, | 1382 gl_->Uniform2f(shader_mask_tex_coord_offset_location, |
1380 mask_uv_rect.x(), | 1383 mask_uv_rect.x(), |
1381 mask_uv_rect.bottom())); | 1384 mask_uv_rect.bottom())); |
1382 GLC(gl_, | 1385 GLC(gl_, |
1383 gl_->Uniform2f(shader_mask_tex_coord_scale_location, | 1386 gl_->Uniform2f(shader_mask_tex_coord_scale_location, |
(...skipping 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2851 RenderPassProgramAA* program = &render_pass_program_aa_[precision]; | 2854 RenderPassProgramAA* program = &render_pass_program_aa_[precision]; |
2852 if (!program->initialized()) { | 2855 if (!program->initialized()) { |
2853 TRACE_EVENT0("cc", "GLRenderer::renderPassProgramAA::initialize"); | 2856 TRACE_EVENT0("cc", "GLRenderer::renderPassProgramAA::initialize"); |
2854 program->Initialize( | 2857 program->Initialize( |
2855 output_surface_->context_provider(), precision, SamplerType2D); | 2858 output_surface_->context_provider(), precision, SamplerType2D); |
2856 } | 2859 } |
2857 return program; | 2860 return program; |
2858 } | 2861 } |
2859 | 2862 |
2860 const GLRenderer::RenderPassMaskProgram* GLRenderer::GetRenderPassMaskProgram( | 2863 const GLRenderer::RenderPassMaskProgram* GLRenderer::GetRenderPassMaskProgram( |
2861 TexCoordPrecision precision) { | 2864 TexCoordPrecision precision, |
2865 SamplerType sampler) { | |
2862 DCHECK_GE(precision, 0); | 2866 DCHECK_GE(precision, 0); |
2863 DCHECK_LT(precision, NumTexCoordPrecisions); | 2867 DCHECK_LT(precision, NumTexCoordPrecisions); |
2864 RenderPassMaskProgram* program = &render_pass_mask_program_[precision]; | 2868 DCHECK_GE(sampler, 0); |
2869 DCHECK_LT(sampler, NumSamplerTypes); | |
2870 RenderPassMaskProgram* program = | |
2871 &render_pass_mask_program_[precision][sampler]; | |
2865 if (!program->initialized()) { | 2872 if (!program->initialized()) { |
2866 TRACE_EVENT0("cc", "GLRenderer::renderPassMaskProgram::initialize"); | 2873 TRACE_EVENT0("cc", "GLRenderer::renderPassMaskProgram::initialize"); |
2867 program->Initialize( | 2874 program->Initialize( |
2868 output_surface_->context_provider(), precision, SamplerType2D); | 2875 output_surface_->context_provider(), precision, sampler); |
2869 } | 2876 } |
2870 return program; | 2877 return program; |
2871 } | 2878 } |
2872 | 2879 |
2873 const GLRenderer::RenderPassMaskProgramAA* | 2880 const GLRenderer::RenderPassMaskProgramAA* |
2874 GLRenderer::GetRenderPassMaskProgramAA(TexCoordPrecision precision) { | 2881 GLRenderer::GetRenderPassMaskProgramAA(TexCoordPrecision precision, |
2882 SamplerType sampler) { | |
2875 DCHECK_GE(precision, 0); | 2883 DCHECK_GE(precision, 0); |
2876 DCHECK_LT(precision, NumTexCoordPrecisions); | 2884 DCHECK_LT(precision, NumTexCoordPrecisions); |
2877 RenderPassMaskProgramAA* program = &render_pass_mask_program_aa_[precision]; | 2885 DCHECK_GE(sampler, 0); |
2886 DCHECK_LT(sampler, NumSamplerTypes); | |
2887 RenderPassMaskProgramAA* program = | |
2888 &render_pass_mask_program_aa_[precision][sampler]; | |
2878 if (!program->initialized()) { | 2889 if (!program->initialized()) { |
2879 TRACE_EVENT0("cc", "GLRenderer::renderPassMaskProgramAA::initialize"); | 2890 TRACE_EVENT0("cc", "GLRenderer::renderPassMaskProgramAA::initialize"); |
2880 program->Initialize( | 2891 program->Initialize( |
2881 output_surface_->context_provider(), precision, SamplerType2D); | 2892 output_surface_->context_provider(), precision, sampler); |
2882 } | 2893 } |
2883 return program; | 2894 return program; |
2884 } | 2895 } |
2885 | 2896 |
2886 const GLRenderer::RenderPassColorMatrixProgram* | 2897 const GLRenderer::RenderPassColorMatrixProgram* |
2887 GLRenderer::GetRenderPassColorMatrixProgram(TexCoordPrecision precision) { | 2898 GLRenderer::GetRenderPassColorMatrixProgram(TexCoordPrecision precision) { |
2888 DCHECK_GE(precision, 0); | 2899 DCHECK_GE(precision, 0); |
2889 DCHECK_LT(precision, NumTexCoordPrecisions); | 2900 DCHECK_LT(precision, NumTexCoordPrecisions); |
2890 RenderPassColorMatrixProgram* program = | 2901 RenderPassColorMatrixProgram* program = |
2891 &render_pass_color_matrix_program_[precision]; | 2902 &render_pass_color_matrix_program_[precision]; |
(...skipping 14 matching lines...) Expand all Loading... | |
2906 if (!program->initialized()) { | 2917 if (!program->initialized()) { |
2907 TRACE_EVENT0("cc", | 2918 TRACE_EVENT0("cc", |
2908 "GLRenderer::renderPassColorMatrixProgramAA::initialize"); | 2919 "GLRenderer::renderPassColorMatrixProgramAA::initialize"); |
2909 program->Initialize( | 2920 program->Initialize( |
2910 output_surface_->context_provider(), precision, SamplerType2D); | 2921 output_surface_->context_provider(), precision, SamplerType2D); |
2911 } | 2922 } |
2912 return program; | 2923 return program; |
2913 } | 2924 } |
2914 | 2925 |
2915 const GLRenderer::RenderPassMaskColorMatrixProgram* | 2926 const GLRenderer::RenderPassMaskColorMatrixProgram* |
2916 GLRenderer::GetRenderPassMaskColorMatrixProgram(TexCoordPrecision precision) { | 2927 GLRenderer::GetRenderPassMaskColorMatrixProgram(TexCoordPrecision precision, |
2928 SamplerType sampler) { | |
2917 DCHECK_GE(precision, 0); | 2929 DCHECK_GE(precision, 0); |
2918 DCHECK_LT(precision, NumTexCoordPrecisions); | 2930 DCHECK_LT(precision, NumTexCoordPrecisions); |
2931 DCHECK_GE(sampler, 0); | |
2932 DCHECK_LT(sampler, NumSamplerTypes); | |
2919 RenderPassMaskColorMatrixProgram* program = | 2933 RenderPassMaskColorMatrixProgram* program = |
2920 &render_pass_mask_color_matrix_program_[precision]; | 2934 &render_pass_mask_color_matrix_program_[precision][sampler]; |
2921 if (!program->initialized()) { | 2935 if (!program->initialized()) { |
2922 TRACE_EVENT0("cc", | 2936 TRACE_EVENT0("cc", |
2923 "GLRenderer::renderPassMaskColorMatrixProgram::initialize"); | 2937 "GLRenderer::renderPassMaskColorMatrixProgram::initialize"); |
2924 program->Initialize( | 2938 program->Initialize( |
2925 output_surface_->context_provider(), precision, SamplerType2D); | 2939 output_surface_->context_provider(), precision, sampler); |
2926 } | 2940 } |
2927 return program; | 2941 return program; |
2928 } | 2942 } |
2929 | 2943 |
2930 const GLRenderer::RenderPassMaskColorMatrixProgramAA* | 2944 const GLRenderer::RenderPassMaskColorMatrixProgramAA* |
2931 GLRenderer::GetRenderPassMaskColorMatrixProgramAA(TexCoordPrecision precision) { | 2945 GLRenderer::GetRenderPassMaskColorMatrixProgramAA(TexCoordPrecision precision, |
2946 SamplerType sampler) { | |
2932 DCHECK_GE(precision, 0); | 2947 DCHECK_GE(precision, 0); |
2933 DCHECK_LT(precision, NumTexCoordPrecisions); | 2948 DCHECK_LT(precision, NumTexCoordPrecisions); |
2949 DCHECK_GE(sampler, 0); | |
2950 DCHECK_LT(sampler, NumSamplerTypes); | |
2934 RenderPassMaskColorMatrixProgramAA* program = | 2951 RenderPassMaskColorMatrixProgramAA* program = |
2935 &render_pass_mask_color_matrix_program_aa_[precision]; | 2952 &render_pass_mask_color_matrix_program_aa_[precision][sampler]; |
2936 if (!program->initialized()) { | 2953 if (!program->initialized()) { |
2937 TRACE_EVENT0("cc", | 2954 TRACE_EVENT0("cc", |
2938 "GLRenderer::renderPassMaskColorMatrixProgramAA::initialize"); | 2955 "GLRenderer::renderPassMaskColorMatrixProgramAA::initialize"); |
2939 program->Initialize( | 2956 program->Initialize( |
2940 output_surface_->context_provider(), precision, SamplerType2D); | 2957 output_surface_->context_provider(), precision, sampler); |
2941 } | 2958 } |
2942 return program; | 2959 return program; |
2943 } | 2960 } |
2944 | 2961 |
2945 const GLRenderer::TileProgram* GLRenderer::GetTileProgram( | 2962 const GLRenderer::TileProgram* GLRenderer::GetTileProgram( |
2946 TexCoordPrecision precision, | 2963 TexCoordPrecision precision, |
2947 SamplerType sampler) { | 2964 SamplerType sampler) { |
2948 DCHECK_GE(precision, 0); | 2965 DCHECK_GE(precision, 0); |
2949 DCHECK_LT(precision, NumTexCoordPrecisions); | 2966 DCHECK_LT(precision, NumTexCoordPrecisions); |
2950 DCHECK_GE(sampler, 0); | 2967 DCHECK_GE(sampler, 0); |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3155 shared_geometry_ = nullptr; | 3172 shared_geometry_ = nullptr; |
3156 | 3173 |
3157 for (int i = 0; i < NumTexCoordPrecisions; ++i) { | 3174 for (int i = 0; i < NumTexCoordPrecisions; ++i) { |
3158 for (int j = 0; j < NumSamplerTypes; ++j) { | 3175 for (int j = 0; j < NumSamplerTypes; ++j) { |
3159 tile_program_[i][j].Cleanup(gl_); | 3176 tile_program_[i][j].Cleanup(gl_); |
3160 tile_program_opaque_[i][j].Cleanup(gl_); | 3177 tile_program_opaque_[i][j].Cleanup(gl_); |
3161 tile_program_swizzle_[i][j].Cleanup(gl_); | 3178 tile_program_swizzle_[i][j].Cleanup(gl_); |
3162 tile_program_swizzle_opaque_[i][j].Cleanup(gl_); | 3179 tile_program_swizzle_opaque_[i][j].Cleanup(gl_); |
3163 tile_program_aa_[i][j].Cleanup(gl_); | 3180 tile_program_aa_[i][j].Cleanup(gl_); |
3164 tile_program_swizzle_aa_[i][j].Cleanup(gl_); | 3181 tile_program_swizzle_aa_[i][j].Cleanup(gl_); |
3182 | |
3183 render_pass_mask_program_[i][j].Cleanup(gl_); | |
3184 render_pass_mask_program_aa_[i][j].Cleanup(gl_); | |
3185 render_pass_mask_color_matrix_program_aa_[i][j].Cleanup(gl_); | |
3186 render_pass_mask_color_matrix_program_[i][j].Cleanup(gl_); | |
3165 } | 3187 } |
3166 | 3188 |
3167 render_pass_mask_program_[i].Cleanup(gl_); | |
3168 render_pass_program_[i].Cleanup(gl_); | 3189 render_pass_program_[i].Cleanup(gl_); |
3169 render_pass_mask_program_aa_[i].Cleanup(gl_); | |
3170 render_pass_program_aa_[i].Cleanup(gl_); | 3190 render_pass_program_aa_[i].Cleanup(gl_); |
3171 render_pass_color_matrix_program_[i].Cleanup(gl_); | 3191 render_pass_color_matrix_program_[i].Cleanup(gl_); |
3172 render_pass_mask_color_matrix_program_aa_[i].Cleanup(gl_); | |
3173 render_pass_color_matrix_program_aa_[i].Cleanup(gl_); | 3192 render_pass_color_matrix_program_aa_[i].Cleanup(gl_); |
3174 render_pass_mask_color_matrix_program_[i].Cleanup(gl_); | |
3175 | 3193 |
3176 texture_program_[i].Cleanup(gl_); | 3194 texture_program_[i].Cleanup(gl_); |
3177 nonpremultiplied_texture_program_[i].Cleanup(gl_); | 3195 nonpremultiplied_texture_program_[i].Cleanup(gl_); |
3178 texture_background_program_[i].Cleanup(gl_); | 3196 texture_background_program_[i].Cleanup(gl_); |
3179 nonpremultiplied_texture_background_program_[i].Cleanup(gl_); | 3197 nonpremultiplied_texture_background_program_[i].Cleanup(gl_); |
3180 texture_io_surface_program_[i].Cleanup(gl_); | 3198 texture_io_surface_program_[i].Cleanup(gl_); |
3181 | 3199 |
3182 video_yuv_program_[i].Cleanup(gl_); | 3200 video_yuv_program_[i].Cleanup(gl_); |
3183 video_yuva_program_[i].Cleanup(gl_); | 3201 video_yuva_program_[i].Cleanup(gl_); |
3184 video_stream_texture_program_[i].Cleanup(gl_); | 3202 video_stream_texture_program_[i].Cleanup(gl_); |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3273 context_support_->ScheduleOverlayPlane( | 3291 context_support_->ScheduleOverlayPlane( |
3274 overlay.plane_z_order, | 3292 overlay.plane_z_order, |
3275 overlay.transform, | 3293 overlay.transform, |
3276 pending_overlay_resources_.back()->texture_id(), | 3294 pending_overlay_resources_.back()->texture_id(), |
3277 overlay.display_rect, | 3295 overlay.display_rect, |
3278 overlay.uv_rect); | 3296 overlay.uv_rect); |
3279 } | 3297 } |
3280 } | 3298 } |
3281 | 3299 |
3282 } // namespace cc | 3300 } // namespace cc |
OLD | NEW |