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

Unified Diff: cc/quads/tile_draw_quad.cc

Issue 1152473006: cc: Remove DrawQuad::IterateResoruces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/tile_draw_quad.cc
diff --git a/cc/quads/tile_draw_quad.cc b/cc/quads/tile_draw_quad.cc
index aa8f748d8b8af5593da1ddfcc6745703cace48d7..02c4a1e25a5f9f175be4c66e389a8a914cda6564 100644
--- a/cc/quads/tile_draw_quad.cc
+++ b/cc/quads/tile_draw_quad.cc
@@ -10,8 +10,7 @@
namespace cc {
-TileDrawQuad::TileDrawQuad()
- : resource_id(0) {
+TileDrawQuad::TileDrawQuad() {
}
TileDrawQuad::~TileDrawQuad() {
@@ -35,7 +34,8 @@ void TileDrawQuad::SetNew(const SharedQuadState* shared_quad_state,
texture_size,
swizzle_contents,
nearest_neighbor);
- this->resource_id = resource_id;
+ resources.ids[kResourceIdIndex] = resource_id;
+ resources.count = 1;
}
void TileDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
@@ -52,12 +52,8 @@ void TileDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
opaque_rect, visible_rect, needs_blending,
tex_coord_rect, texture_size, swizzle_contents,
nearest_neighbor);
- this->resource_id = resource_id;
-}
-
-void TileDrawQuad::IterateResources(
- const ResourceIteratorCallback& callback) {
- resource_id = callback.Run(resource_id);
+ resources.ids[kResourceIdIndex] = resource_id;
+ resources.count = 1;
}
const TileDrawQuad* TileDrawQuad::MaterialCast(const DrawQuad* quad) {
@@ -67,7 +63,7 @@ const TileDrawQuad* TileDrawQuad::MaterialCast(const DrawQuad* quad) {
void TileDrawQuad::ExtendValue(base::trace_event::TracedValue* value) const {
ContentDrawQuadBase::ExtendValue(value);
- value->SetInteger("resource_id", resource_id);
+ value->SetInteger("resource_id", resources.ids[kResourceIdIndex]);
}
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698