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

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: 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 2c3986507554768eb44cf0938c968237b0a32858..88c88f60b1913c48d870297cc150c4c47afb912c 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -765,19 +765,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