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

Unified Diff: cc/layers/layer_impl.cc

Issue 1152473006: cc: Remove DrawQuad::IterateResoruces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 65a7a507e6e22c824a9f9487f949742db3ce2619..7f560e676e1b2f919d39e3626799f2ec64d3a2c1 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -743,19 +743,12 @@ void LayerImpl::NoteLayerPropertyChangedForDescendants() {
SetNeedsPushProperties();
}
-#if DCHECK_IS_ON()
-// Verify that the resource id is valid.
-static ResourceId ValidateResource(const ResourceProvider* provider,
- ResourceId id) {
- provider->ValidateResource(id);
- return id;
-}
-#endif
-
void LayerImpl::ValidateQuadResourcesInternal(DrawQuad* quad) const {
#if DCHECK_IS_ON()
- quad->IterateResources(
- base::Bind(&ValidateResource, layer_tree_impl_->resource_provider()));
+ const ResourceProvider* resource_provider =
+ layer_tree_impl_->resource_provider();
+ for (ResourceId resource_id : quad->resources)
+ resource_provider->ValidateResource(resource_id);
#endif
}

Powered by Google App Engine
This is Rietveld 408576698