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

Unified Diff: cc/quads/yuv_video_draw_quad.cc

Issue 207233002: cc: Support texcoord offsets in YUVVideoDrawQuad (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 5baa37b0 Initial. Created 6 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
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 e410757c4cdfb17984ad136a5f4fbe5f761de90f..ea5667742b6ea708ecb32dd94287be202afc6ecf 100644
--- a/cc/quads/yuv_video_draw_quad.cc
+++ b/cc/quads/yuv_video_draw_quad.cc
@@ -25,7 +25,7 @@ void YUVVideoDrawQuad::SetNew(const SharedQuadState* shared_quad_state,
const gfx::Rect& rect,
const gfx::Rect& opaque_rect,
const gfx::Rect& visible_rect,
- const gfx::SizeF& tex_scale,
+ const gfx::RectF& tex_coord_rect,
unsigned y_plane_resource_id,
unsigned u_plane_resource_id,
unsigned v_plane_resource_id,
@@ -33,7 +33,7 @@ void YUVVideoDrawQuad::SetNew(const SharedQuadState* shared_quad_state,
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->tex_coord_rect = tex_coord_rect;
this->y_plane_resource_id = y_plane_resource_id;
this->u_plane_resource_id = u_plane_resource_id;
this->v_plane_resource_id = v_plane_resource_id;
@@ -45,14 +45,14 @@ void YUVVideoDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
const gfx::Rect& opaque_rect,
const gfx::Rect& visible_rect,
bool needs_blending,
- const gfx::SizeF& tex_scale,
+ const 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) {
DrawQuad::SetAll(shared_quad_state, DrawQuad::YUV_VIDEO_CONTENT, rect,
opaque_rect, visible_rect, needs_blending);
- this->tex_scale = tex_scale;
+ this->tex_coord_rect = tex_coord_rect;
this->y_plane_resource_id = y_plane_resource_id;
this->u_plane_resource_id = u_plane_resource_id;
this->v_plane_resource_id = v_plane_resource_id;
@@ -75,7 +75,7 @@ const YUVVideoDrawQuad* YUVVideoDrawQuad::MaterialCast(
}
void YUVVideoDrawQuad::ExtendValue(base::DictionaryValue* value) const {
- value->Set("tex_scale", MathUtil::AsValue(tex_scale).release());
+ value->Set("tex_coord_rect", MathUtil::AsValue(tex_coord_rect).release());
value->SetInteger("y_plane_resource_id", y_plane_resource_id);
value->SetInteger("u_plane_resource_id", u_plane_resource_id);
value->SetInteger("v_plane_resource_id", v_plane_resource_id);

Powered by Google App Engine
This is Rietveld 408576698