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

Side by Side Diff: cc/yuv_video_draw_quad.cc

Issue 11269017: Plumb through cropped output size for VideoFrame (Closed) Base URL: https://git.chromium.org/git/chromium/src@git-svn
Patch Set: Update. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "config.h" 5 #include "config.h"
6 6
7 #include "cc/yuv_video_draw_quad.h" 7 #include "cc/yuv_video_draw_quad.h"
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
11 namespace cc { 11 namespace cc {
12 12
13 scoped_ptr<YUVVideoDrawQuad> YUVVideoDrawQuad::create(const SharedQuadState* sha redQuadState, const gfx::Rect& quadRect, const VideoLayerImpl::FramePlane& yPlan e, const VideoLayerImpl::FramePlane& uPlane, const VideoLayerImpl::FramePlane& v Plane) 13 scoped_ptr<YUVVideoDrawQuad> YUVVideoDrawQuad::create(
14 const SharedQuadState* sharedQuadState,
15 const gfx::Rect& quadRect,
16 const gfx::SizeF& texScale,
17 const VideoLayerImpl::FramePlane& yPlane,
18 const VideoLayerImpl::FramePlane& uPlane,
19 const VideoLayerImpl::FramePlane& vPlane)
14 { 20 {
15 return make_scoped_ptr(new YUVVideoDrawQuad(sharedQuadState, quadRect, yPlan e, uPlane, vPlane)); 21 return make_scoped_ptr(new YUVVideoDrawQuad(sharedQuadState,
22 quadRect, texScale,
23 yPlane, uPlane, vPlane));
16 } 24 }
17 25
18 YUVVideoDrawQuad::YUVVideoDrawQuad(const SharedQuadState* sharedQuadState, const gfx::Rect& quadRect, const VideoLayerImpl::FramePlane& yPlane, const VideoLayer Impl::FramePlane& uPlane, const VideoLayerImpl::FramePlane& vPlane) 26 YUVVideoDrawQuad::YUVVideoDrawQuad(
27 const SharedQuadState* sharedQuadState,
28 const gfx::Rect& quadRect,
29 const gfx::SizeF& texScale,
30 const VideoLayerImpl::FramePlane& yPlane,
31 const VideoLayerImpl::FramePlane& uPlane,
32 const VideoLayerImpl::FramePlane& vPlane)
19 : DrawQuad(sharedQuadState, DrawQuad::YUVVideoContent, quadRect) 33 : DrawQuad(sharedQuadState, DrawQuad::YUVVideoContent, quadRect)
34 , m_texScale(texScale)
20 , m_yPlane(yPlane) 35 , m_yPlane(yPlane)
21 , m_uPlane(uPlane) 36 , m_uPlane(uPlane)
22 , m_vPlane(vPlane) 37 , m_vPlane(vPlane)
23 { 38 {
24 } 39 }
25 40
26 const YUVVideoDrawQuad* YUVVideoDrawQuad::materialCast(const DrawQuad* quad) 41 const YUVVideoDrawQuad* YUVVideoDrawQuad::materialCast(const DrawQuad* quad)
27 { 42 {
28 DCHECK(quad->material() == DrawQuad::YUVVideoContent); 43 DCHECK(quad->material() == DrawQuad::YUVVideoContent);
29 return static_cast<const YUVVideoDrawQuad*>(quad); 44 return static_cast<const YUVVideoDrawQuad*>(quad);
30 } 45 }
31 46
32 } // namespace cc 47 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698