Index: cc/quads/tile_draw_quad.cc |
diff --git a/cc/quads/tile_draw_quad.cc b/cc/quads/tile_draw_quad.cc |
index 04c473834cba42f72d7d85e6221f832182948551..19f6592ed50e4d9b5f4fa1a337f1922a22365aad 100644 |
--- a/cc/quads/tile_draw_quad.cc |
+++ b/cc/quads/tile_draw_quad.cc |
@@ -10,8 +10,10 @@ |
namespace cc { |
TileDrawQuad::TileDrawQuad() |
- : resource_id(0), |
- swizzle_contents(false) { |
+ : resource_id(0) { |
+} |
+ |
+TileDrawQuad::~TileDrawQuad() { |
} |
scoped_ptr<TileDrawQuad> TileDrawQuad::Create() { |
@@ -19,37 +21,31 @@ scoped_ptr<TileDrawQuad> TileDrawQuad::Create() { |
} |
void TileDrawQuad::SetNew(const SharedQuadState* shared_quad_state, |
- gfx::Rect rect, |
- gfx::Rect opaque_rect, |
+ const gfx::Rect& rect, |
+ const gfx::Rect& opaque_rect, |
unsigned resource_id, |
const gfx::RectF& tex_coord_rect, |
- gfx::Size texture_size, |
+ const gfx::Size& texture_size, |
bool swizzle_contents) { |
- gfx::Rect visible_rect = rect; |
- bool needs_blending = false; |
- DrawQuad::SetAll(shared_quad_state, DrawQuad::TILED_CONTENT, rect, |
- opaque_rect, visible_rect, needs_blending); |
+ TileDrawQuadBase::SetNew(shared_quad_state, DrawQuad::TILED_CONTENT, rect, |
+ opaque_rect, tex_coord_rect, texture_size, |
+ swizzle_contents); |
this->resource_id = resource_id; |
- this->tex_coord_rect = tex_coord_rect; |
- this->texture_size = texture_size; |
- this->swizzle_contents = swizzle_contents; |
} |
void TileDrawQuad::SetAll(const SharedQuadState* shared_quad_state, |
- gfx::Rect rect, |
- gfx::Rect opaque_rect, |
- gfx::Rect visible_rect, |
+ const gfx::Rect& rect, |
+ const gfx::Rect& opaque_rect, |
+ const gfx::Rect& visible_rect, |
bool needs_blending, |
unsigned resource_id, |
const gfx::RectF& tex_coord_rect, |
- gfx::Size texture_size, |
+ const gfx::Size& texture_size, |
bool swizzle_contents) { |
- DrawQuad::SetAll(shared_quad_state, DrawQuad::TILED_CONTENT, rect, |
- opaque_rect, visible_rect, needs_blending); |
+ TileDrawQuadBase::SetAll(shared_quad_state, DrawQuad::TILED_CONTENT, rect, |
+ opaque_rect, visible_rect, needs_blending, |
+ tex_coord_rect, texture_size, swizzle_contents); |
this->resource_id = resource_id; |
- this->tex_coord_rect = tex_coord_rect; |
- this->texture_size = texture_size; |
- this->swizzle_contents = swizzle_contents; |
} |
void TileDrawQuad::IterateResources( |
@@ -57,8 +53,7 @@ void TileDrawQuad::IterateResources( |
resource_id = callback.Run(resource_id); |
} |
-const TileDrawQuad* TileDrawQuad::MaterialCast( |
- const DrawQuad* quad) { |
+const TileDrawQuad* TileDrawQuad::MaterialCast(const DrawQuad* quad) { |
DCHECK(quad->material == DrawQuad::TILED_CONTENT); |
return static_cast<const TileDrawQuad*>(quad); |
} |