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

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: iterators! 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..78bcc482ae04bc290cdfd3ec8a45cc42bfd03591 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 (const ResourceId& resource_id : quad->resources)
piman 2015/05/28 19:35:46 nit: ResourceId instead of const ResourceId&
vmpstr 2015/05/28 22:36:58 Done.
+ resource_provider->ValidateResource(resource_id);
#endif
}

Powered by Google App Engine
This is Rietveld 408576698