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

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: Now with passing unittest!wq 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
Index: cc/gl_renderer.cc
diff --git a/cc/gl_renderer.cc b/cc/gl_renderer.cc
index 1c4fec29be73976daaf395194e736c91fe30c564..462fcb7c39e1d1d82beded9d71094faa576f4820 100644
--- a/cc/gl_renderer.cc
+++ b/cc/gl_renderer.cc
@@ -865,12 +865,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));

Powered by Google App Engine
This is Rietveld 408576698