Index: cc/quads/texture_draw_quad.cc |
diff --git a/cc/quads/texture_draw_quad.cc b/cc/quads/texture_draw_quad.cc |
index 4b8720a1ed7e6c5f3803f0087737ae15857bffa7..7106af5e27b996e9e2fd8226fc56e3a4d2384f9b 100644 |
--- a/cc/quads/texture_draw_quad.cc |
+++ b/cc/quads/texture_draw_quad.cc |
@@ -13,8 +13,7 @@ |
namespace cc { |
TextureDrawQuad::TextureDrawQuad() |
- : resource_id(0), |
- premultiplied_alpha(false), |
+ : premultiplied_alpha(false), |
background_color(SK_ColorTRANSPARENT), |
y_flipped(false), |
nearest_neighbor(false) { |
@@ -40,7 +39,8 @@ void TextureDrawQuad::SetNew(const SharedQuadState* shared_quad_state, |
|| vertex_opacity[2] != 1.0f || vertex_opacity[3] != 1.0f; |
DrawQuad::SetAll(shared_quad_state, DrawQuad::TEXTURE_CONTENT, rect, |
opaque_rect, visible_rect, needs_blending); |
- this->resource_id = resource_id; |
+ resources.ids[kResourceIdIndex] = resource_id; |
+ resources.count = 1; |
this->premultiplied_alpha = premultiplied_alpha; |
this->uv_top_left = uv_top_left; |
this->uv_bottom_right = uv_bottom_right; |
@@ -68,7 +68,8 @@ void TextureDrawQuad::SetAll(const SharedQuadState* shared_quad_state, |
bool nearest_neighbor) { |
DrawQuad::SetAll(shared_quad_state, DrawQuad::TEXTURE_CONTENT, rect, |
opaque_rect, visible_rect, needs_blending); |
- this->resource_id = resource_id; |
+ resources.ids[kResourceIdIndex] = resource_id; |
+ resources.count = 1; |
this->premultiplied_alpha = premultiplied_alpha; |
this->uv_top_left = uv_top_left; |
this->uv_bottom_right = uv_bottom_right; |
@@ -81,18 +82,13 @@ void TextureDrawQuad::SetAll(const SharedQuadState* shared_quad_state, |
this->nearest_neighbor = nearest_neighbor; |
} |
-void TextureDrawQuad::IterateResources( |
- const ResourceIteratorCallback& callback) { |
- resource_id = callback.Run(resource_id); |
-} |
- |
const TextureDrawQuad* TextureDrawQuad::MaterialCast(const DrawQuad* quad) { |
DCHECK(quad->material == DrawQuad::TEXTURE_CONTENT); |
return static_cast<const TextureDrawQuad*>(quad); |
} |
void TextureDrawQuad::ExtendValue(base::trace_event::TracedValue* value) const { |
- value->SetInteger("resource_id", resource_id); |
+ value->SetInteger("resource_id", resources.ids[kResourceIdIndex]); |
value->SetBoolean("premultiplied_alpha", premultiplied_alpha); |
MathUtil::AddToTracedValue("uv_top_left", uv_top_left, value); |