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

Unified Diff: cc/render_pass_draw_quad.cc

Issue 11543013: Combine mask texture parameters into single gfx::RectF (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address nits Created 8 years 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/render_pass_draw_quad.h ('k') | cc/render_surface_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/render_pass_draw_quad.cc
diff --git a/cc/render_pass_draw_quad.cc b/cc/render_pass_draw_quad.cc
index 5f3df0839df115c762f9715f19b1fba6c09452a5..f0ae447b5ceed2dab0001570b2845b49a47b8a24 100644
--- a/cc/render_pass_draw_quad.cc
+++ b/cc/render_pass_draw_quad.cc
@@ -9,11 +9,7 @@ namespace cc {
RenderPassDrawQuad::RenderPassDrawQuad()
: render_pass_id(RenderPass::Id(-1, -1)),
is_replica(false),
- mask_resource_id(-1),
- mask_tex_coord_scale_x(0),
- mask_tex_coord_scale_y(0),
- mask_tex_coord_offset_x(0),
- mask_tex_coord_offset_y(0) {
+ mask_resource_id(-1) {
}
scoped_ptr<RenderPassDrawQuad> RenderPassDrawQuad::Create() {
@@ -35,10 +31,7 @@ void RenderPassDrawQuad::SetNew(const SharedQuadState* shared_quad_state,
bool is_replica,
ResourceProvider::ResourceId mask_resource_id,
gfx::Rect contents_changed_since_last_frame,
- float mask_tex_coord_scale_x,
- float mask_tex_coord_scale_y,
- float mask_tex_coord_offset_x,
- float mask_tex_coord_offset_y) {
+ gfx::RectF mask_uv_rect) {
DCHECK(render_pass_id.layer_id > 0);
DCHECK(render_pass_id.index >= 0);
@@ -51,10 +44,7 @@ void RenderPassDrawQuad::SetNew(const SharedQuadState* shared_quad_state,
this->is_replica = is_replica;
this->mask_resource_id = mask_resource_id;
this->contents_changed_since_last_frame = contents_changed_since_last_frame;
- this->mask_tex_coord_scale_x = mask_tex_coord_scale_x;
- this->mask_tex_coord_scale_y = mask_tex_coord_scale_y;
- this->mask_tex_coord_offset_x = mask_tex_coord_offset_x;
- this->mask_tex_coord_offset_y = mask_tex_coord_offset_y;
+ this->mask_uv_rect = mask_uv_rect;
}
void RenderPassDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
@@ -66,10 +56,7 @@ void RenderPassDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
bool is_replica,
ResourceProvider::ResourceId mask_resource_id,
gfx::Rect contents_changed_since_last_frame,
- float mask_tex_coord_scale_x,
- float mask_tex_coord_scale_y,
- float mask_tex_coord_offset_x,
- float mask_tex_coord_offset_y) {
+ gfx::RectF mask_uv_rect) {
DCHECK(render_pass_id.layer_id > 0);
DCHECK(render_pass_id.index >= 0);
@@ -79,10 +66,7 @@ void RenderPassDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
this->is_replica = is_replica;
this->mask_resource_id = mask_resource_id;
this->contents_changed_since_last_frame = contents_changed_since_last_frame;
- this->mask_tex_coord_scale_x = mask_tex_coord_scale_x;
- this->mask_tex_coord_scale_y = mask_tex_coord_scale_y;
- this->mask_tex_coord_offset_x = mask_tex_coord_offset_x;
- this->mask_tex_coord_offset_y = mask_tex_coord_offset_y;
+ this->mask_uv_rect = mask_uv_rect;
}
const RenderPassDrawQuad* RenderPassDrawQuad::MaterialCast(
« no previous file with comments | « cc/render_pass_draw_quad.h ('k') | cc/render_surface_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698