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

Unified Diff: cc/layers/layer_impl.h

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/io_surface_layer_impl.cc ('k') | cc/layers/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.h
diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h
index 730b188e35fe66576ad53ef28f625a8b4632c32e..f3eb4cea90fca7de26b3025c93c5c09f2176ba04 100644
--- a/cc/layers/layer_impl.h
+++ b/cc/layers/layer_impl.h
@@ -247,6 +247,13 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
AppendQuadsData* append_quads_data) {}
virtual void DidDraw(ResourceProvider* resource_provider);
+ // Verify that the resource ids in the quad are valid.
+ void ValidateQuadResources(DrawQuad* quad) const {
+#if DCHECK_IS_ON()
+ ValidateQuadResourcesInternal(quad);
+#endif
+ }
+
virtual void GetContentsResourceId(ResourceProvider::ResourceId* resource_id,
gfx::Size* resource_size) const;
@@ -669,6 +676,8 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
gfx::Rect GetScaledEnclosingRectInTargetSpace(float scale) const;
private:
+ void ValidateQuadResourcesInternal(DrawQuad* quad) const;
+
void PushScrollOffset(const gfx::ScrollOffset* scroll_offset);
// If the new scroll offset is assigned from the root scroll offset delegate,
// LayerImpl won't inform the root scroll offset delegate about the scroll
« no previous file with comments | « cc/layers/io_surface_layer_impl.cc ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698