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

Unified Diff: cc/quads/yuv_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: addressing comments on patchset 7 Created 7 years, 9 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/quads/yuv_video_draw_quad.h ('k') | content/common/cc_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/quads/yuv_video_draw_quad.cc
diff --git a/cc/quads/yuv_video_draw_quad.cc b/cc/quads/yuv_video_draw_quad.cc
index 7876861bd878578bf38d9e91a4d3db3fb4c9f024..fd2cad86a5cede87d3ac1c08c523c7ecd6700f5f 100644
--- a/cc/quads/yuv_video_draw_quad.cc
+++ b/cc/quads/yuv_video_draw_quad.cc
@@ -16,20 +16,17 @@ scoped_ptr<YUVVideoDrawQuad> YUVVideoDrawQuad::Create() {
}
void YUVVideoDrawQuad::SetNew(const SharedQuadState* shared_quad_state,
- gfx::Rect rect,
- gfx::Rect opaque_rect,
- gfx::SizeF tex_scale,
- const VideoLayerImpl::FramePlane& y_plane,
- const VideoLayerImpl::FramePlane& u_plane,
- const VideoLayerImpl::FramePlane& v_plane) {
+ gfx::Rect rect,
+ gfx::Rect opaque_rect,
+ gfx::SizeF tex_scale,
+ const VideoLayerImpl::FramePlane* y_plane,
+ const VideoLayerImpl::FramePlane* u_plane,
+ const VideoLayerImpl::FramePlane* v_plane,
+ const VideoLayerImpl::FramePlane* a_plane) {
gfx::Rect visible_rect = rect;
- bool needs_blending = false;
- DrawQuad::SetAll(shared_quad_state, DrawQuad::YUV_VIDEO_CONTENT, rect,
- opaque_rect, visible_rect, needs_blending);
- this->tex_scale = tex_scale;
- this->y_plane = y_plane;
- this->u_plane = u_plane;
- this->v_plane = v_plane;
+ bool needs_blending = true;
danakj 2013/04/04 22:18:45 This is true only if there's an a_plane present, r
vignesh 2013/04/05 22:00:29 Right. Sorry, my bad. Done.
+ SetAll(shared_quad_state, rect, opaque_rect, visible_rect, needs_blending,
+ tex_scale, y_plane, u_plane, v_plane, a_plane);
}
void YUVVideoDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
@@ -38,15 +35,18 @@ void YUVVideoDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
gfx::Rect visible_rect,
bool needs_blending,
gfx::SizeF tex_scale,
- const VideoLayerImpl::FramePlane& y_plane,
- const VideoLayerImpl::FramePlane& u_plane,
- const VideoLayerImpl::FramePlane& v_plane) {
+ const VideoLayerImpl::FramePlane* y_plane,
+ const VideoLayerImpl::FramePlane* u_plane,
+ const VideoLayerImpl::FramePlane* v_plane,
+ const VideoLayerImpl::FramePlane* a_plane) {
DrawQuad::SetAll(shared_quad_state, DrawQuad::YUV_VIDEO_CONTENT, rect,
opaque_rect, visible_rect, needs_blending);
this->tex_scale = tex_scale;
- this->y_plane = y_plane;
- this->u_plane = u_plane;
- this->v_plane = v_plane;
+ this->y_plane = *y_plane;
+ this->u_plane = *u_plane;
+ this->v_plane = *v_plane;
+ if (a_plane)
+ this->a_plane = *a_plane;
}
void YUVVideoDrawQuad::IterateResources(
@@ -54,6 +54,8 @@ void YUVVideoDrawQuad::IterateResources(
y_plane.resource_id = callback.Run(y_plane.resource_id);
u_plane.resource_id = callback.Run(u_plane.resource_id);
v_plane.resource_id = callback.Run(v_plane.resource_id);
+ if(a_plane.resource_id)
danakj 2013/04/04 22:18:45 nit: space before (
vignesh 2013/04/05 22:00:29 Done.
+ a_plane.resource_id = callback.Run(a_plane.resource_id);
}
const YUVVideoDrawQuad* YUVVideoDrawQuad::MaterialCast(
« no previous file with comments | « cc/quads/yuv_video_draw_quad.h ('k') | content/common/cc_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698