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

Side by Side Diff: cc/yuv_video_draw_quad.cc

Issue 11418047: cc: Turn DrawQuad into a struct-like class with public data members. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: no virtual for SetAll() 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/tiled_layer_impl_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "cc/yuv_video_draw_quad.h" 5 #include "cc/yuv_video_draw_quad.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace cc { 9 namespace cc {
10 10
(...skipping 12 matching lines...) Expand all
23 } 23 }
24 24
25 YUVVideoDrawQuad::YUVVideoDrawQuad( 25 YUVVideoDrawQuad::YUVVideoDrawQuad(
26 const SharedQuadState* sharedQuadState, 26 const SharedQuadState* sharedQuadState,
27 const gfx::Rect& quadRect, 27 const gfx::Rect& quadRect,
28 const gfx::Rect& opaqueRect, 28 const gfx::Rect& opaqueRect,
29 const gfx::SizeF& texScale, 29 const gfx::SizeF& texScale,
30 const VideoLayerImpl::FramePlane& yPlane, 30 const VideoLayerImpl::FramePlane& yPlane,
31 const VideoLayerImpl::FramePlane& uPlane, 31 const VideoLayerImpl::FramePlane& uPlane,
32 const VideoLayerImpl::FramePlane& vPlane) 32 const VideoLayerImpl::FramePlane& vPlane)
33 : DrawQuad(sharedQuadState, DrawQuad::YUV_VIDEO_CONTENT, quadRect, opaqueRec t) 33 : m_texScale(texScale)
34 , m_texScale(texScale)
35 , m_yPlane(yPlane) 34 , m_yPlane(yPlane)
36 , m_uPlane(uPlane) 35 , m_uPlane(uPlane)
37 , m_vPlane(vPlane) 36 , m_vPlane(vPlane)
38 { 37 {
38 gfx::Rect visibleRect = quadRect;
39 bool needsBlending = false;
40 DrawQuad::SetAll(sharedQuadState, DrawQuad::YUV_VIDEO_CONTENT, quadRect, opa queRect, visibleRect, needsBlending);
39 } 41 }
40 42
41 YUVVideoDrawQuad::~YUVVideoDrawQuad() 43 YUVVideoDrawQuad::~YUVVideoDrawQuad()
42 { 44 {
43 } 45 }
44 46
45 const YUVVideoDrawQuad* YUVVideoDrawQuad::materialCast(const DrawQuad* quad) 47 const YUVVideoDrawQuad* YUVVideoDrawQuad::materialCast(const DrawQuad* quad)
46 { 48 {
47 DCHECK(quad->material() == DrawQuad::YUV_VIDEO_CONTENT); 49 DCHECK(quad->material == DrawQuad::YUV_VIDEO_CONTENT);
48 return static_cast<const YUVVideoDrawQuad*>(quad); 50 return static_cast<const YUVVideoDrawQuad*>(quad);
49 } 51 }
50 52
51 } // namespace cc 53 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiled_layer_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698