Index: cc/quads/tile_draw_quad.cc |
diff --git a/cc/quads/tile_draw_quad.cc b/cc/quads/tile_draw_quad.cc |
index 80ea6bd7d2b5026b3dd991925a22871807b4d9ac..414b320cb30e02cf6f06a3e08bcd1e435355b015 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() { |
@@ -25,14 +27,10 @@ void TileDrawQuad::SetNew(const SharedQuadState* shared_quad_state, |
const gfx::RectF& tex_coord_rect, |
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); |
+ ContentDrawQuadBase::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, |
@@ -44,12 +42,10 @@ void TileDrawQuad::SetAll(const SharedQuadState* shared_quad_state, |
const gfx::RectF& tex_coord_rect, |
gfx::Size texture_size, |
bool swizzle_contents) { |
- DrawQuad::SetAll(shared_quad_state, DrawQuad::TILED_CONTENT, rect, |
- opaque_rect, visible_rect, needs_blending); |
+ ContentDrawQuadBase::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); |
} |