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

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

Issue 2088273003: Video Color Managament (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use gfx::ColorProfile Created 4 years, 4 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
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>
11 #include <limits> 11 #include <limits>
12 #include <memory> 12 #include <memory>
13 #include <set> 13 #include <set>
14 #include <string> 14 #include <string>
15 #include <vector> 15 #include <vector>
16 16
17 #include "base/feature_list.h"
17 #include "base/logging.h" 18 #include "base/logging.h"
18 #include "base/macros.h" 19 #include "base/macros.h"
19 #include "base/memory/ptr_util.h" 20 #include "base/memory/ptr_util.h"
20 #include "base/strings/string_split.h" 21 #include "base/strings/string_split.h"
21 #include "base/strings/string_util.h" 22 #include "base/strings/string_util.h"
22 #include "base/strings/stringprintf.h" 23 #include "base/strings/stringprintf.h"
23 #include "base/threading/thread_task_runner_handle.h" 24 #include "base/threading/thread_task_runner_handle.h"
24 #include "base/trace_event/trace_event.h" 25 #include "base/trace_event/trace_event.h"
25 #include "build/build_config.h" 26 #include "build/build_config.h"
26 #include "cc/base/container_util.h" 27 #include "cc/base/container_util.h"
(...skipping 15 matching lines...) Expand all
42 #include "cc/quads/stream_video_draw_quad.h" 43 #include "cc/quads/stream_video_draw_quad.h"
43 #include "cc/quads/texture_draw_quad.h" 44 #include "cc/quads/texture_draw_quad.h"
44 #include "cc/raster/scoped_gpu_raster.h" 45 #include "cc/raster/scoped_gpu_raster.h"
45 #include "cc/resources/resource_pool.h" 46 #include "cc/resources/resource_pool.h"
46 #include "cc/resources/scoped_resource.h" 47 #include "cc/resources/scoped_resource.h"
47 #include "gpu/GLES2/gl2extchromium.h" 48 #include "gpu/GLES2/gl2extchromium.h"
48 #include "gpu/command_buffer/client/context_support.h" 49 #include "gpu/command_buffer/client/context_support.h"
49 #include "gpu/command_buffer/client/gles2_interface.h" 50 #include "gpu/command_buffer/client/gles2_interface.h"
50 #include "gpu/command_buffer/common/gles2_cmd_format.h" 51 #include "gpu/command_buffer/common/gles2_cmd_format.h"
51 #include "gpu/command_buffer/common/gpu_memory_allocation.h" 52 #include "gpu/command_buffer/common/gpu_memory_allocation.h"
53 #include "media/base/media_switches.h"
52 #include "skia/ext/texture_handle.h" 54 #include "skia/ext/texture_handle.h"
53 #include "third_party/skia/include/core/SkBitmap.h" 55 #include "third_party/skia/include/core/SkBitmap.h"
54 #include "third_party/skia/include/core/SkColor.h" 56 #include "third_party/skia/include/core/SkColor.h"
55 #include "third_party/skia/include/core/SkColorFilter.h" 57 #include "third_party/skia/include/core/SkColorFilter.h"
56 #include "third_party/skia/include/core/SkImage.h" 58 #include "third_party/skia/include/core/SkImage.h"
57 #include "third_party/skia/include/core/SkSurface.h" 59 #include "third_party/skia/include/core/SkSurface.h"
58 #include "third_party/skia/include/gpu/GrContext.h" 60 #include "third_party/skia/include/gpu/GrContext.h"
59 #include "third_party/skia/include/gpu/gl/GrGLInterface.h" 61 #include "third_party/skia/include/gpu/gl/GrGLInterface.h"
60 #include "third_party/skia/include/gpu/gl/GrGLTypes.h" 62 #include "third_party/skia/include/gpu/gl/GrGLTypes.h"
63 #include "ui/gfx/color_space.h"
61 #include "ui/gfx/geometry/quad_f.h" 64 #include "ui/gfx/geometry/quad_f.h"
62 #include "ui/gfx/geometry/rect_conversions.h" 65 #include "ui/gfx/geometry/rect_conversions.h"
63 #include "ui/gfx/skia_util.h" 66 #include "ui/gfx/skia_util.h"
64 67
65 using gpu::gles2::GLES2Interface; 68 using gpu::gles2::GLES2Interface;
66 69
67 namespace cc { 70 namespace cc {
68 namespace { 71 namespace {
69 72
70 Float4 UVTransform(const TextureDrawQuad* quad) { 73 Float4 UVTransform(const TextureDrawQuad* quad) {
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 is_backbuffer_discarded_(false), 394 is_backbuffer_discarded_(false),
392 is_scissor_enabled_(false), 395 is_scissor_enabled_(false),
393 scissor_rect_needs_reset_(true), 396 scissor_rect_needs_reset_(true),
394 stencil_shadow_(false), 397 stencil_shadow_(false),
395 blend_shadow_(false), 398 blend_shadow_(false),
396 highp_threshold_min_(highp_threshold_min), 399 highp_threshold_min_(highp_threshold_min),
397 highp_threshold_cache_(0), 400 highp_threshold_cache_(0),
398 use_sync_query_(false), 401 use_sync_query_(false),
399 gl_composited_texture_quad_border_( 402 gl_composited_texture_quad_border_(
400 settings->gl_composited_texture_quad_border), 403 settings->gl_composited_texture_quad_border),
401 bound_geometry_(NO_BINDING) { 404 bound_geometry_(NO_BINDING),
405 color_lut_cache_(gl_) {
402 DCHECK(gl_); 406 DCHECK(gl_);
403 DCHECK(context_support_); 407 DCHECK(context_support_);
404 408
405 const auto& context_caps = 409 const auto& context_caps =
406 output_surface_->context_provider()->ContextCapabilities(); 410 output_surface_->context_provider()->ContextCapabilities();
407 411
408 capabilities_.using_partial_swap = 412 capabilities_.using_partial_swap =
409 settings_->partial_swap_enabled && context_caps.post_sub_buffer; 413 settings_->partial_swap_enabled && context_caps.post_sub_buffer;
410 capabilities_.allow_empty_swap = 414 capabilities_.allow_empty_swap =
411 capabilities_.using_partial_swap || context_caps.commit_overlay_planes; 415 capabilities_.using_partial_swap || context_caps.commit_overlay_planes;
(...skipping 1792 matching lines...) Expand 10 before | Expand all | Expand 10 after
2204 const YUVVideoDrawQuad* quad, 2208 const YUVVideoDrawQuad* quad,
2205 const gfx::QuadF* clip_region) { 2209 const gfx::QuadF* clip_region) {
2206 SetBlendEnabled(quad->ShouldDrawWithBlending()); 2210 SetBlendEnabled(quad->ShouldDrawWithBlending());
2207 2211
2208 TexCoordPrecision tex_coord_precision = TexCoordPrecisionRequired( 2212 TexCoordPrecision tex_coord_precision = TexCoordPrecisionRequired(
2209 gl_, &highp_threshold_cache_, highp_threshold_min_, 2213 gl_, &highp_threshold_cache_, highp_threshold_min_,
2210 quad->shared_quad_state->visible_quad_layer_rect.bottom_right()); 2214 quad->shared_quad_state->visible_quad_layer_rect.bottom_right());
2211 2215
2212 bool use_alpha_plane = quad->a_plane_resource_id() != 0; 2216 bool use_alpha_plane = quad->a_plane_resource_id() != 0;
2213 bool use_nv12 = quad->v_plane_resource_id() == quad->u_plane_resource_id(); 2217 bool use_nv12 = quad->v_plane_resource_id() == quad->u_plane_resource_id();
2214 2218 bool use_color_lut =
2219 base::FeatureList::IsEnabled(media::kVideoColorManagement);
2215 DCHECK(!(use_nv12 && use_alpha_plane)); 2220 DCHECK(!(use_nv12 && use_alpha_plane));
2216 2221
2217 ResourceProvider::ScopedSamplerGL y_plane_lock( 2222 ResourceProvider::ScopedSamplerGL y_plane_lock(
2218 resource_provider_, quad->y_plane_resource_id(), GL_TEXTURE1, GL_LINEAR); 2223 resource_provider_, quad->y_plane_resource_id(), GL_TEXTURE1, GL_LINEAR);
2219 ResourceProvider::ScopedSamplerGL u_plane_lock( 2224 ResourceProvider::ScopedSamplerGL u_plane_lock(
2220 resource_provider_, quad->u_plane_resource_id(), GL_TEXTURE2, GL_LINEAR); 2225 resource_provider_, quad->u_plane_resource_id(), GL_TEXTURE2, GL_LINEAR);
2221 DCHECK_EQ(y_plane_lock.target(), u_plane_lock.target()); 2226 DCHECK_EQ(y_plane_lock.target(), u_plane_lock.target());
2222 // TODO(jbauman): Use base::Optional when available. 2227 // TODO(jbauman): Use base::Optional when available.
2223 std::unique_ptr<ResourceProvider::ScopedSamplerGL> v_plane_lock; 2228 std::unique_ptr<ResourceProvider::ScopedSamplerGL> v_plane_lock;
2224 if (!use_nv12) { 2229 if (!use_nv12) {
(...skipping 18 matching lines...) Expand all
2243 int ya_tex_offset_location = -1; 2248 int ya_tex_offset_location = -1;
2244 int uv_tex_scale_location = -1; 2249 int uv_tex_scale_location = -1;
2245 int uv_tex_offset_location = -1; 2250 int uv_tex_offset_location = -1;
2246 int ya_clamp_rect_location = -1; 2251 int ya_clamp_rect_location = -1;
2247 int uv_clamp_rect_location = -1; 2252 int uv_clamp_rect_location = -1;
2248 int y_texture_location = -1; 2253 int y_texture_location = -1;
2249 int u_texture_location = -1; 2254 int u_texture_location = -1;
2250 int v_texture_location = -1; 2255 int v_texture_location = -1;
2251 int uv_texture_location = -1; 2256 int uv_texture_location = -1;
2252 int a_texture_location = -1; 2257 int a_texture_location = -1;
2258 int lut_texture_location = -1;
2253 int yuv_matrix_location = -1; 2259 int yuv_matrix_location = -1;
2254 int yuv_adj_location = -1; 2260 int yuv_adj_location = -1;
2255 int alpha_location = -1; 2261 int alpha_location = -1;
2262 int resource_multiplier_location = -1;
2263 int resource_offset_location = -1;
2256 const VideoYUVProgram* program = GetVideoYUVProgram( 2264 const VideoYUVProgram* program = GetVideoYUVProgram(
2257 tex_coord_precision, sampler, use_alpha_plane, use_nv12); 2265 tex_coord_precision, sampler, use_alpha_plane, use_nv12, use_color_lut);
2258 DCHECK(program && (program->initialized() || IsContextLost())); 2266 DCHECK(program && (program->initialized() || IsContextLost()));
2259 SetUseProgram(program->program()); 2267 SetUseProgram(program->program());
2260 matrix_location = program->vertex_shader().matrix_location(); 2268 matrix_location = program->vertex_shader().matrix_location();
2261 ya_tex_scale_location = program->vertex_shader().ya_tex_scale_location(); 2269 ya_tex_scale_location = program->vertex_shader().ya_tex_scale_location();
2262 ya_tex_offset_location = program->vertex_shader().ya_tex_offset_location(); 2270 ya_tex_offset_location = program->vertex_shader().ya_tex_offset_location();
2263 uv_tex_scale_location = program->vertex_shader().uv_tex_scale_location(); 2271 uv_tex_scale_location = program->vertex_shader().uv_tex_scale_location();
2264 uv_tex_offset_location = program->vertex_shader().uv_tex_offset_location(); 2272 uv_tex_offset_location = program->vertex_shader().uv_tex_offset_location();
2265 y_texture_location = program->fragment_shader().y_texture_location(); 2273 y_texture_location = program->fragment_shader().y_texture_location();
2266 u_texture_location = program->fragment_shader().u_texture_location(); 2274 u_texture_location = program->fragment_shader().u_texture_location();
2267 v_texture_location = program->fragment_shader().v_texture_location(); 2275 v_texture_location = program->fragment_shader().v_texture_location();
2268 uv_texture_location = program->fragment_shader().uv_texture_location(); 2276 uv_texture_location = program->fragment_shader().uv_texture_location();
2269 a_texture_location = program->fragment_shader().a_texture_location(); 2277 a_texture_location = program->fragment_shader().a_texture_location();
2278 lut_texture_location = program->fragment_shader().lut_texture_location();
2270 yuv_matrix_location = program->fragment_shader().yuv_matrix_location(); 2279 yuv_matrix_location = program->fragment_shader().yuv_matrix_location();
2271 yuv_adj_location = program->fragment_shader().yuv_adj_location(); 2280 yuv_adj_location = program->fragment_shader().yuv_adj_location();
2272 ya_clamp_rect_location = program->fragment_shader().ya_clamp_rect_location(); 2281 ya_clamp_rect_location = program->fragment_shader().ya_clamp_rect_location();
2273 uv_clamp_rect_location = program->fragment_shader().uv_clamp_rect_location(); 2282 uv_clamp_rect_location = program->fragment_shader().uv_clamp_rect_location();
2274 alpha_location = program->fragment_shader().alpha_location(); 2283 alpha_location = program->fragment_shader().alpha_location();
2284 resource_multiplier_location =
2285 program->fragment_shader().resource_multiplier_location();
2286 resource_offset_location =
2287 program->fragment_shader().resource_offset_location();
2275 2288
2276 gfx::SizeF ya_tex_scale(1.0f, 1.0f); 2289 gfx::SizeF ya_tex_scale(1.0f, 1.0f);
2277 gfx::SizeF uv_tex_scale(1.0f, 1.0f); 2290 gfx::SizeF uv_tex_scale(1.0f, 1.0f);
2278 if (sampler != SAMPLER_TYPE_2D_RECT) { 2291 if (sampler != SAMPLER_TYPE_2D_RECT) {
2279 DCHECK(!quad->ya_tex_size.IsEmpty()); 2292 DCHECK(!quad->ya_tex_size.IsEmpty());
2280 DCHECK(!quad->uv_tex_size.IsEmpty()); 2293 DCHECK(!quad->uv_tex_size.IsEmpty());
2281 ya_tex_scale = gfx::SizeF(1.0f / quad->ya_tex_size.width(), 2294 ya_tex_scale = gfx::SizeF(1.0f / quad->ya_tex_size.width(),
2282 1.0f / quad->ya_tex_size.height()); 2295 1.0f / quad->ya_tex_size.height());
2283 uv_tex_scale = gfx::SizeF(1.0f / quad->uv_tex_size.width(), 2296 uv_tex_scale = gfx::SizeF(1.0f / quad->uv_tex_size.width(),
2284 1.0f / quad->uv_tex_size.height()); 2297 1.0f / quad->uv_tex_size.height());
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
2389 2402
2390 for (int i = 0; i < 9; ++i) 2403 for (int i = 0; i < 9; ++i)
2391 yuv_to_rgb_multiplied[i] = yuv_to_rgb[i] * quad->resource_multiplier; 2404 yuv_to_rgb_multiplied[i] = yuv_to_rgb[i] * quad->resource_multiplier;
2392 2405
2393 for (int i = 0; i < 3; ++i) { 2406 for (int i = 0; i < 3; ++i) {
2394 yuv_adjust_with_offset[i] = 2407 yuv_adjust_with_offset[i] =
2395 yuv_adjust[i] * adjustment_multiplier / quad->resource_multiplier - 2408 yuv_adjust[i] * adjustment_multiplier / quad->resource_multiplier -
2396 quad->resource_offset; 2409 quad->resource_offset;
2397 } 2410 }
2398 2411
2412 if (lut_texture_location != -1) {
2413 unsigned int lut_texture = color_lut_cache_.GetLUT(
2414 quad->video_color_space, output_surface_->color_space(), 32);
2415 gl_->ActiveTexture(GL_TEXTURE5);
2416 gl_->BindTexture(GL_TEXTURE_2D, lut_texture);
2417 gl_->Uniform1i(lut_texture_location, 5);
2418 gl_->ActiveTexture(GL_TEXTURE0);
2419 }
2420
2421 if (resource_multiplier_location != -1) {
2422 gl_->Uniform1f(resource_multiplier_location, quad->resource_multiplier);
2423 }
2424
2425 if (resource_offset_location != -1) {
2426 gl_->Uniform1f(resource_offset_location, quad->resource_offset);
2427 }
2428
2399 // The transform and vertex data are used to figure out the extents that the 2429 // The transform and vertex data are used to figure out the extents that the
2400 // un-antialiased quad should have and which vertex this is and the float 2430 // un-antialiased quad should have and which vertex this is and the float
2401 // quad passed in via uniform is the actual geometry that gets used to draw 2431 // quad passed in via uniform is the actual geometry that gets used to draw
2402 // it. This is why this centered rect is used and not the original quad_rect. 2432 // it. This is why this centered rect is used and not the original quad_rect.
2403 auto tile_rect = gfx::RectF(quad->rect); 2433 auto tile_rect = gfx::RectF(quad->rect);
2404 gl_->UniformMatrix3fv(yuv_matrix_location, 1, 0, yuv_to_rgb_multiplied); 2434 if (yuv_matrix_location != -1) {
2405 gl_->Uniform3fv(yuv_adj_location, 1, yuv_adjust_with_offset); 2435 gl_->UniformMatrix3fv(yuv_matrix_location, 1, 0, yuv_to_rgb_multiplied);
2436 }
2437
2438 if (yuv_adj_location) {
2439 gl_->Uniform3fv(yuv_adj_location, 1, yuv_adjust_with_offset);
2440 }
2406 2441
2407 SetShaderOpacity(quad->shared_quad_state->opacity, alpha_location); 2442 SetShaderOpacity(quad->shared_quad_state->opacity, alpha_location);
2408 if (!clip_region) { 2443 if (!clip_region) {
2409 DrawQuadGeometry(frame->projection_matrix, 2444 DrawQuadGeometry(frame->projection_matrix,
2410 quad->shared_quad_state->quad_to_target_transform, 2445 quad->shared_quad_state->quad_to_target_transform,
2411 tile_rect, matrix_location); 2446 tile_rect, matrix_location);
2412 } else { 2447 } else {
2413 float uvs[8] = {0}; 2448 float uvs[8] = {0};
2414 GetScaledUVs(quad->visible_rect, clip_region, uvs); 2449 GetScaledUVs(quad->visible_rect, clip_region, uvs);
2415 gfx::QuadF region_quad = *clip_region; 2450 gfx::QuadF region_quad = *clip_region;
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
2945 } 2980 }
2946 2981
2947 void GLRenderer::DidReceiveTextureInUseResponses( 2982 void GLRenderer::DidReceiveTextureInUseResponses(
2948 const gpu::TextureInUseResponses& responses) { 2983 const gpu::TextureInUseResponses& responses) {
2949 DCHECK(settings_->release_overlay_resources_after_gpu_query); 2984 DCHECK(settings_->release_overlay_resources_after_gpu_query);
2950 for (const gpu::TextureInUseResponse& response : responses) { 2985 for (const gpu::TextureInUseResponse& response : responses) {
2951 if (!response.in_use) { 2986 if (!response.in_use) {
2952 swapped_and_acked_overlay_resources_.erase(response.texture); 2987 swapped_and_acked_overlay_resources_.erase(response.texture);
2953 } 2988 }
2954 } 2989 }
2990 color_lut_cache_.Swap();
2955 } 2991 }
2956 2992
2957 void GLRenderer::EnforceMemoryPolicy() { 2993 void GLRenderer::EnforceMemoryPolicy() {
2958 if (!visible()) { 2994 if (!visible()) {
2959 TRACE_EVENT0("cc", "GLRenderer::EnforceMemoryPolicy dropping resources"); 2995 TRACE_EVENT0("cc", "GLRenderer::EnforceMemoryPolicy dropping resources");
2960 ReleaseRenderPassTextures(); 2996 ReleaseRenderPassTextures();
2961 DiscardBackbuffer(); 2997 DiscardBackbuffer();
2962 output_surface_->context_provider()->DeleteCachedResources(); 2998 output_surface_->context_provider()->DeleteCachedResources();
2963 gl_->Flush(); 2999 gl_->Flush();
2964 } 3000 }
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
3636 program->Initialize(output_surface_->context_provider(), precision, 3672 program->Initialize(output_surface_->context_provider(), precision,
3637 sampler); 3673 sampler);
3638 } 3674 }
3639 return program; 3675 return program;
3640 } 3676 }
3641 3677
3642 const GLRenderer::VideoYUVProgram* GLRenderer::GetVideoYUVProgram( 3678 const GLRenderer::VideoYUVProgram* GLRenderer::GetVideoYUVProgram(
3643 TexCoordPrecision precision, 3679 TexCoordPrecision precision,
3644 SamplerType sampler, 3680 SamplerType sampler,
3645 bool use_alpha_plane, 3681 bool use_alpha_plane,
3646 bool use_nv12) { 3682 bool use_nv12,
3683 bool use_color_lut) {
3647 DCHECK_GE(precision, 0); 3684 DCHECK_GE(precision, 0);
3648 DCHECK_LE(precision, LAST_TEX_COORD_PRECISION); 3685 DCHECK_LE(precision, LAST_TEX_COORD_PRECISION);
3649 DCHECK_GE(sampler, 0); 3686 DCHECK_GE(sampler, 0);
3650 DCHECK_LE(sampler, LAST_SAMPLER_TYPE); 3687 DCHECK_LE(sampler, LAST_SAMPLER_TYPE);
3651 VideoYUVProgram* program = 3688 VideoYUVProgram* program =
3652 &video_yuv_program_[precision][sampler][use_alpha_plane][use_nv12]; 3689 &video_yuv_program_[precision][sampler][use_alpha_plane][use_nv12]
3690 [use_color_lut];
3653 if (!program->initialized()) { 3691 if (!program->initialized()) {
3654 TRACE_EVENT0("cc", "GLRenderer::videoYUVProgram::initialize"); 3692 TRACE_EVENT0("cc", "GLRenderer::videoYUVProgram::initialize");
3655 program->mutable_fragment_shader()->SetFeatures(use_alpha_plane, use_nv12); 3693 program->mutable_fragment_shader()->SetFeatures(use_alpha_plane, use_nv12,
3694 use_color_lut);
3656 program->Initialize(output_surface_->context_provider(), precision, 3695 program->Initialize(output_surface_->context_provider(), precision,
3657 sampler); 3696 sampler);
3658 } 3697 }
3659 return program; 3698 return program;
3660 } 3699 }
3661 3700
3662 const GLRenderer::VideoStreamTextureProgram* 3701 const GLRenderer::VideoStreamTextureProgram*
3663 GLRenderer::GetVideoStreamTextureProgram(TexCoordPrecision precision) { 3702 GLRenderer::GetVideoStreamTextureProgram(TexCoordPrecision precision) {
3664 DCHECK_GE(precision, 0); 3703 DCHECK_GE(precision, 0);
3665 DCHECK_LE(precision, LAST_TEX_COORD_PRECISION); 3704 DCHECK_LE(precision, LAST_TEX_COORD_PRECISION);
(...skipping 23 matching lines...) Expand all
3689 for (int l = 0; l <= LAST_MASK_VALUE; ++l) { 3728 for (int l = 0; l <= LAST_MASK_VALUE; ++l) {
3690 render_pass_mask_program_[i][j][k][l].Cleanup(gl_); 3729 render_pass_mask_program_[i][j][k][l].Cleanup(gl_);
3691 render_pass_mask_program_aa_[i][j][k][l].Cleanup(gl_); 3730 render_pass_mask_program_aa_[i][j][k][l].Cleanup(gl_);
3692 render_pass_mask_color_matrix_program_aa_[i][j][k][l].Cleanup(gl_); 3731 render_pass_mask_color_matrix_program_aa_[i][j][k][l].Cleanup(gl_);
3693 render_pass_mask_color_matrix_program_[i][j][k][l].Cleanup(gl_); 3732 render_pass_mask_color_matrix_program_[i][j][k][l].Cleanup(gl_);
3694 } 3733 }
3695 } 3734 }
3696 3735
3697 for (int k = 0; k < 2; k++) { 3736 for (int k = 0; k < 2; k++) {
3698 for (int l = 0; l < 2; l++) { 3737 for (int l = 0; l < 2; l++) {
3699 video_yuv_program_[i][j][k][l].Cleanup(gl_); 3738 for (int m = 0; m < 2; m++) {
3739 video_yuv_program_[i][j][k][l][m].Cleanup(gl_);
3740 }
3700 } 3741 }
3701 } 3742 }
3702 } 3743 }
3703 for (int j = 0; j <= LAST_BLEND_MODE; j++) { 3744 for (int j = 0; j <= LAST_BLEND_MODE; j++) {
3704 render_pass_program_[i][j].Cleanup(gl_); 3745 render_pass_program_[i][j].Cleanup(gl_);
3705 render_pass_program_aa_[i][j].Cleanup(gl_); 3746 render_pass_program_aa_[i][j].Cleanup(gl_);
3706 render_pass_color_matrix_program_[i][j].Cleanup(gl_); 3747 render_pass_color_matrix_program_[i][j].Cleanup(gl_);
3707 render_pass_color_matrix_program_aa_[i][j].Cleanup(gl_); 3748 render_pass_color_matrix_program_aa_[i][j].Cleanup(gl_);
3708 } 3749 }
3709 3750
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
3849 texture_id = pending_overlay_resources_.back()->texture_id(); 3890 texture_id = pending_overlay_resources_.back()->texture_id();
3850 } 3891 }
3851 3892
3852 context_support_->ScheduleOverlayPlane( 3893 context_support_->ScheduleOverlayPlane(
3853 overlay.plane_z_order, overlay.transform, texture_id, 3894 overlay.plane_z_order, overlay.transform, texture_id,
3854 ToNearestRect(overlay.display_rect), overlay.uv_rect); 3895 ToNearestRect(overlay.display_rect), overlay.uv_rect);
3855 } 3896 }
3856 } 3897 }
3857 3898
3858 } // namespace cc 3899 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698