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

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

Issue 1007953003: Revert of Increase YUV video clamping (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « cc/layers/video_layer_impl.cc ('k') | cc/output/renderer_pixeltest.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 <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 1993 matching lines...) Expand 10 before | Expand all | Expand 10 after
2004 quad->tex_coord_rect.width(), 2004 quad->tex_coord_rect.width(),
2005 quad->tex_coord_rect.height())); 2005 quad->tex_coord_rect.height()));
2006 GLC(gl_, 2006 GLC(gl_,
2007 gl_->Uniform2f(tex_offset_location, 2007 gl_->Uniform2f(tex_offset_location,
2008 quad->tex_coord_rect.x(), 2008 quad->tex_coord_rect.x(),
2009 quad->tex_coord_rect.y())); 2009 quad->tex_coord_rect.y()));
2010 // Clamping to half a texel inside the tex coord rect prevents bilinear 2010 // Clamping to half a texel inside the tex coord rect prevents bilinear
2011 // filtering from filtering outside the tex coord rect. 2011 // filtering from filtering outside the tex coord rect.
2012 gfx::RectF clamp_rect(quad->tex_coord_rect); 2012 gfx::RectF clamp_rect(quad->tex_coord_rect);
2013 // Special case: empty texture size implies no clamping. 2013 // Special case: empty texture size implies no clamping.
2014 if (!quad->min_tex_size.IsEmpty()) { 2014 if (!quad->tex_size.IsEmpty()) {
2015 clamp_rect.Inset(0.5f / quad->min_tex_size.width(), 2015 clamp_rect.Inset(0.5f / quad->tex_size.width(),
2016 0.5f / quad->min_tex_size.height()); 2016 0.5f / quad->tex_size.height());
2017 } 2017 }
2018 GLC(gl_, gl_->Uniform4f(clamp_rect_location, clamp_rect.x(), clamp_rect.y(), 2018 GLC(gl_, gl_->Uniform4f(clamp_rect_location, clamp_rect.x(), clamp_rect.y(),
2019 clamp_rect.right(), clamp_rect.bottom())); 2019 clamp_rect.right(), clamp_rect.bottom()));
2020 2020
2021 GLC(gl_, gl_->Uniform1i(y_texture_location, 1)); 2021 GLC(gl_, gl_->Uniform1i(y_texture_location, 1));
2022 GLC(gl_, gl_->Uniform1i(u_texture_location, 2)); 2022 GLC(gl_, gl_->Uniform1i(u_texture_location, 2));
2023 GLC(gl_, gl_->Uniform1i(v_texture_location, 3)); 2023 GLC(gl_, gl_->Uniform1i(v_texture_location, 3));
2024 if (use_alpha_plane) 2024 if (use_alpha_plane)
2025 GLC(gl_, gl_->Uniform1i(a_texture_location, 4)); 2025 GLC(gl_, gl_->Uniform1i(a_texture_location, 4));
2026 2026
(...skipping 1496 matching lines...) Expand 10 before | Expand all | Expand 10 after
3523 context_support_->ScheduleOverlayPlane( 3523 context_support_->ScheduleOverlayPlane(
3524 overlay.plane_z_order, 3524 overlay.plane_z_order,
3525 overlay.transform, 3525 overlay.transform,
3526 pending_overlay_resources_.back()->texture_id(), 3526 pending_overlay_resources_.back()->texture_id(),
3527 overlay.display_rect, 3527 overlay.display_rect,
3528 overlay.uv_rect); 3528 overlay.uv_rect);
3529 } 3529 }
3530 } 3530 }
3531 3531
3532 } // namespace cc 3532 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/video_layer_impl.cc ('k') | cc/output/renderer_pixeltest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698