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

Unified Diff: cc/gl_renderer.cc

Issue 11269017: Plumb through cropped output size for VideoFrame (Closed) Base URL: https://git.chromium.org/git/chromium/src@git-svn
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/layer_tree_host_impl_unittest.cc » ('j') | cc/layer_tree_host_impl_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/gl_renderer.cc
diff --git a/cc/gl_renderer.cc b/cc/gl_renderer.cc
index b059d76ae06a8b3cedbfe7bc089e0c41ed6f0c99..ac45eeb75af861715e42e5a716ccb073a8f6462c 100644
--- a/cc/gl_renderer.cc
+++ b/cc/gl_renderer.cc
@@ -860,12 +860,7 @@ void GLRenderer::drawYUVVideoQuad(const DrawingFrame& frame, const YUVVideoDrawQ
GLC(context(), context()->useProgram(program->program()));
- float yWidthScaleFactor = static_cast<float>(yPlane.visibleSize.width()) / yPlane.size.width();
- // Arbitrarily take the u sizes because u and v dimensions are identical.
- float uvWidthScaleFactor = static_cast<float>(uPlane.visibleSize.width()) / uPlane.size.width();
- GLC(context(), context()->uniform1f(program->vertexShader().yWidthScaleFactorLocation(), yWidthScaleFactor));
- GLC(context(), context()->uniform1f(program->vertexShader().uvWidthScaleFactorLocation(), uvWidthScaleFactor));
-
+ GLC(context(), context()->uniform2f(program->vertexShader().texScaleLocation(), quad->texScale().width(), quad->texScale().height()));
GLC(context(), context()->uniform1i(program->fragmentShader().yTextureLocation(), 1));
GLC(context(), context()->uniform1i(program->fragmentShader().uTextureLocation(), 2));
GLC(context(), context()->uniform1i(program->fragmentShader().vTextureLocation(), 3));
« no previous file with comments | « no previous file | cc/layer_tree_host_impl_unittest.cc » ('j') | cc/layer_tree_host_impl_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698