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

Unified Diff: cc/video_layer_impl.cc

Issue 11774005: Migrate more functions from MathUtil to gfx::Transform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: try to fix double/float conversion errors Created 7 years, 11 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 | « cc/software_renderer.cc ('k') | ui/gfx/transform.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/video_layer_impl.cc
diff --git a/cc/video_layer_impl.cc b/cc/video_layer_impl.cc
index 8a320b8690c8d8da4c9dd903d2cafd6695f9ce16..908472c47d52bdf0d8b07ec8db8d5f8f0e37f8cb 100644
--- a/cc/video_layer_impl.cc
+++ b/cc/video_layer_impl.cc
@@ -30,11 +30,11 @@ VideoLayerImpl::VideoLayerImpl(LayerTreeImpl* treeImpl, int id, VideoFrameProvid
, m_externalTextureResource(0)
{
// This matrix is the default transformation for stream textures, and flips on the Y axis.
- m_streamTextureMatrix = MathUtil::createGfxTransform(
- 1, 0, 0, 0,
- 0, -1, 0, 0,
- 0, 0, 1, 0,
- 0, 1, 0, 1);
+ m_streamTextureMatrix = gfx::Transform(
+ 1.0, 0.0, 0.0, 0.0,
+ 0.0, -1.0, 0.0, 1.0,
+ 0.0, 0.0, 1.0, 0.0,
+ 0.0, 0.0, 0.0, 1.0);
// This only happens during a commit on the compositor thread while the main
// thread is blocked. That makes this a thread-safe call to set the video
@@ -402,11 +402,11 @@ void VideoLayerImpl::DidReceiveFrame()
void VideoLayerImpl::DidUpdateMatrix(const float matrix[16])
{
- m_streamTextureMatrix = MathUtil::createGfxTransform(
- matrix[0], matrix[1], matrix[2], matrix[3],
- matrix[4], matrix[5], matrix[6], matrix[7],
- matrix[8], matrix[9], matrix[10], matrix[11],
- matrix[12], matrix[13], matrix[14], matrix[15]);
+ m_streamTextureMatrix = gfx::Transform(
+ matrix[0], matrix[4], matrix[8], matrix[12],
+ matrix[1], matrix[5], matrix[9], matrix[13],
+ matrix[2], matrix[6], matrix[10], matrix[14],
+ matrix[3], matrix[7], matrix[11], matrix[15]);
setNeedsRedraw();
}
« no previous file with comments | « cc/software_renderer.cc ('k') | ui/gfx/transform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698