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

Unified Diff: cc/video_layer_impl.cc

Issue 11308153: Migrate most of cc/ from WebKit::WebTransformationMatrix to gfx::Transform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased to tip of tree and addressed feedback Created 8 years, 1 month 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/video_layer_impl.cc
diff --git a/cc/video_layer_impl.cc b/cc/video_layer_impl.cc
index a3225416a0c9abbd8c5fe212321768023fbee064..a18bb7b8f6bb6a366844d9a8940ef9d4a6da180d 100644
--- a/cc/video_layer_impl.cc
+++ b/cc/video_layer_impl.cc
@@ -7,6 +7,7 @@
#include "base/logging.h"
#include "cc/io_surface_draw_quad.h"
#include "cc/layer_tree_host_impl.h"
+#include "cc/math_util.h"
#include "cc/quad_sink.h"
#include "cc/resource_provider.h"
#include "cc/stream_video_draw_quad.h"
@@ -30,7 +31,7 @@ VideoLayerImpl::VideoLayerImpl(int id, WebKit::WebVideoFrameProvider* provider,
, m_externalTextureResource(0)
{
// This matrix is the default transformation for stream textures, and flips on the Y axis.
- m_streamTextureMatrix = WebKit::WebTransformationMatrix(
+ m_streamTextureMatrix = MathUtil::createGfxTransform(
1, 0, 0, 0,
0, -1, 0, 0,
0, 0, 1, 0,
@@ -252,8 +253,8 @@ void VideoLayerImpl::appendQuads(QuadSink& quadSink, AppendQuadsData& appendQuad
}
case GL_TEXTURE_EXTERNAL_OES: {
// StreamTexture hardware decoder.
- WebKit::WebTransformationMatrix transform(m_streamTextureMatrix);
- transform.scaleNonUniform(texWidthScale, texHeightScale);
+ gfx::Transform transform(m_streamTextureMatrix);
+ transform.PreconcatScale(texWidthScale, texHeightScale);
scoped_ptr<StreamVideoDrawQuad> streamVideoQuad = StreamVideoDrawQuad::Create();
streamVideoQuad->SetNew(sharedQuadState, quadRect, opaqueRect, m_frame->texture_id(), transform);
quadSink.append(streamVideoQuad.PassAs<DrawQuad>(), appendQuadsData);
@@ -401,7 +402,7 @@ void VideoLayerImpl::didReceiveFrame()
void VideoLayerImpl::didUpdateMatrix(const float matrix[16])
{
- m_streamTextureMatrix = WebKit::WebTransformationMatrix(
+ 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],
« cc/tiled_layer_impl.h ('K') | « cc/video_layer_impl.h ('k') | content/common/cc_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698