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

Unified Diff: cc/quads/draw_quad.h

Issue 1152473006: cc: Remove DrawQuad::IterateResoruces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mkwst review 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
« no previous file with comments | « cc/quads/debug_border_draw_quad.cc ('k') | cc/quads/draw_quad.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/quads/draw_quad.h
diff --git a/cc/quads/draw_quad.h b/cc/quads/draw_quad.h
index 56201f76a90ad401684dbb5758d244574b72efeb..fa1959b621e1ca5ab4251608b1209143fa3a0b1a 100644
--- a/cc/quads/draw_quad.h
+++ b/cc/quads/draw_quad.h
@@ -96,9 +96,6 @@ class CC_EXPORT DrawQuad {
return !opaque_rect.Contains(visible_rect);
}
- typedef base::Callback<ResourceId(ResourceId)> ResourceIteratorCallback;
- virtual void IterateResources(const ResourceIteratorCallback& callback) = 0;
-
// Is the left edge of this tile aligned with the originating layer's
// left edge?
bool IsLeftEdge() const { return !rect.x(); }
@@ -127,6 +124,22 @@ class CC_EXPORT DrawQuad {
void AsValueInto(base::trace_event::TracedValue* value) const;
+ struct CC_EXPORT Resources {
+ enum : size_t { kMaxResourceIdCount = 4 };
Nico 2015/07/23 18:04:41 (drive-by since I just saw this: explicit types on
+ Resources();
+
+ ResourceId* begin() { return ids; }
+ ResourceId* end() {
+ DCHECK_LE(count, kMaxResourceIdCount);
+ return ids + count;
+ }
+
+ size_t count;
+ ResourceId ids[kMaxResourceIdCount];
+ };
+
+ Resources resources;
+
protected:
DrawQuad();
« no previous file with comments | « cc/quads/debug_border_draw_quad.cc ('k') | cc/quads/draw_quad.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698