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

Side by Side Diff: cc/yuva_video_draw_quad.cc

Issue 12157002: Adding YUVA support for enabling Alpha Playback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moving VP8 Alpha Playback behind its own flag Created 7 years, 10 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2012 The Chromium Authors. All rights reserved.
fgalligan1 2013/02/12 01:20:58 2013
fgalligan1 2013/02/12 01:28:57 nm. Don't change it.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "cc/yuva_video_draw_quad.h"
6
7 #include "base/logging.h"
8
9 namespace cc {
10
11 YUVAVideoDrawQuad::YUVAVideoDrawQuad() {}
12 YUVAVideoDrawQuad::~YUVAVideoDrawQuad() {}
13
14 scoped_ptr<YUVAVideoDrawQuad> YUVAVideoDrawQuad::Create() {
15 return make_scoped_ptr(new YUVAVideoDrawQuad);
16 }
17
18 void YUVAVideoDrawQuad::SetNew(const SharedQuadState* shared_quad_state,
19 gfx::Rect rect,
20 gfx::Rect opaque_rect,
21 gfx::SizeF tex_scale,
22 const VideoLayerImpl::FramePlane& y_plane,
23 const VideoLayerImpl::FramePlane& u_plane,
24 const VideoLayerImpl::FramePlane& v_plane,
25 const VideoLayerImpl::FramePlane& a_plane) {
26 gfx::Rect visible_rect = rect;
27 bool needs_blending = true;
fgalligan1 2013/02/12 01:20:58 Just call SetAll(shared_quad_state, rect, opaque_r
vigneshv 2013/02/15 18:05:02 Done.
28 DrawQuad::SetAll(shared_quad_state, DrawQuad::YUVA_VIDEO_CONTENT, rect,
29 opaque_rect, visible_rect, needs_blending);
30 this->tex_scale = tex_scale;
31 this->y_plane = y_plane;
32 this->u_plane = u_plane;
33 this->v_plane = v_plane;
34 this->a_plane = a_plane;
35 }
36
37 void YUVAVideoDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
38 gfx::Rect rect,
39 gfx::Rect opaque_rect,
40 gfx::Rect visible_rect,
41 bool needs_blending,
42 gfx::SizeF tex_scale,
43 const VideoLayerImpl::FramePlane& y_plane,
44 const VideoLayerImpl::FramePlane& u_plane,
45 const VideoLayerImpl::FramePlane& v_plane,
46 const VideoLayerImpl::FramePlane& a_plane) {
47 DrawQuad::SetAll(shared_quad_state, DrawQuad::YUVA_VIDEO_CONTENT, rect,
48 opaque_rect, visible_rect, needs_blending);
49 this->tex_scale = tex_scale;
50 this->y_plane = y_plane;
51 this->u_plane = u_plane;
52 this->v_plane = v_plane;
53 this->a_plane = a_plane;
54 }
55
56 const YUVAVideoDrawQuad* YUVAVideoDrawQuad::MaterialCast(
57 const DrawQuad* quad) {
58 DCHECK(quad->material == DrawQuad::YUVA_VIDEO_CONTENT);
59 return static_cast<const YUVAVideoDrawQuad*>(quad);
60 }
61
62 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698