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

Unified Diff: cc/layers/layer_impl.cc

Issue 1096703006: cc: Some more cleanup and removing TODOs for validating resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup2: const Created 5 years, 8 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/layers/layer_impl.h ('k') | cc/layers/nine_patch_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 5655596d0eb4e79c5ea4b95c4789c2fcb9fd7c78..c47e50cfa46c6e9a75a69743dc19619456566201 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -746,6 +746,23 @@ void LayerImpl::NoteLayerPropertyChangedForDescendants() {
SetNeedsPushProperties();
}
+#if DCHECK_IS_ON()
+// Verify that the resource id is valid.
+static ResourceProvider::ResourceId ValidateResource(
+ const ResourceProvider* provider,
+ ResourceProvider::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()));
+#endif
+}
+
const char* LayerImpl::LayerTypeAsString() const {
return "cc::LayerImpl";
}
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/nine_patch_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698