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

Unified Diff: cc/quads/yuv_video_draw_quad.h

Issue 92703003: Support videos with JPEG color range in GPU YUV convert path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@yuv_v2
Patch Set: Use ColorSpace enum, rather than a boolean for jpeg. Created 6 years, 8 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
Index: cc/quads/yuv_video_draw_quad.h
diff --git a/cc/quads/yuv_video_draw_quad.h b/cc/quads/yuv_video_draw_quad.h
index 65b35e05b94249266dc13d25b0cdee6b96e75b49..834b2788ee01d0f4b02c05ca5ca88bd468a6d25a 100644
--- a/cc/quads/yuv_video_draw_quad.h
+++ b/cc/quads/yuv_video_draw_quad.h
@@ -15,6 +15,11 @@ namespace cc {
class CC_EXPORT YUVVideoDrawQuad : public DrawQuad {
public:
+ enum ColorSpace {
+ kRec601, // SDTV standard with restricted "studio swing" color range.
+ kRec601_Jpeg, // Full color range [0, 255] variant of the above.
+ };
Tom Sepez 2014/05/02 00:25:37 Generally, the way we do this is by adding a const
piman 2014/05/02 00:37:28 nit: we use ALL_CAPS style for enum values in chro
+
virtual ~YUVVideoDrawQuad();
static scoped_ptr<YUVVideoDrawQuad> Create();
@@ -27,7 +32,8 @@ class CC_EXPORT YUVVideoDrawQuad : public DrawQuad {
unsigned y_plane_resource_id,
unsigned u_plane_resource_id,
unsigned v_plane_resource_id,
- unsigned a_plane_resource_id);
+ unsigned a_plane_resource_id,
+ ColorSpace color_space);
void SetAll(const SharedQuadState* shared_quad_state,
const gfx::Rect& rect,
@@ -38,13 +44,15 @@ class CC_EXPORT YUVVideoDrawQuad : public DrawQuad {
unsigned y_plane_resource_id,
unsigned u_plane_resource_id,
unsigned v_plane_resource_id,
- unsigned a_plane_resource_id);
+ unsigned a_plane_resource_id,
+ ColorSpace color_space);
gfx::RectF tex_coord_rect;
unsigned y_plane_resource_id;
unsigned u_plane_resource_id;
unsigned v_plane_resource_id;
unsigned a_plane_resource_id;
+ ColorSpace color_space;
virtual void IterateResources(const ResourceIteratorCallback& callback)
OVERRIDE;

Powered by Google App Engine
This is Rietveld 408576698