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

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..735da8d4a12a0acebe99669aa4c304b722bf6998 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -765,19 +765,14 @@ void LayerImpl::NoteLayerPropertyChangedForDescendants() {
SetNeedsPushProperties();
}
+void LayerImpl::ValidateQuadResources(DrawQuad* quad) const {
#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();
+ quad->IterateResources([resource_provider](ResourceId resource_id) {
+ resource_provider->ValidateResource(resource_id);
+ return resource_id;
+ });
#endif
}

Powered by Google App Engine
This is Rietveld 408576698