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

Unified Diff: cc/layers/layer.h

Issue 23530003: cc: Block commit on activate by setting a flag on LayerTreeHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: blockcommit: fix flake Created 7 years, 4 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/delegated_renderer_layer.cc ('k') | cc/layers/layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.h
diff --git a/cc/layers/layer.h b/cc/layers/layer.h
index b659ab265546a3a64b813baebc66afd6f98963df..71f6c2c09d1b12532dda42f492ab2b4187102126 100644
--- a/cc/layers/layer.h
+++ b/cc/layers/layer.h
@@ -397,13 +397,6 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>,
gfx::Rect LayerRectToContentRect(const gfx::RectF& layer_rect) const;
- // In impl-side painting, this returns true if this layer type is not
- // compatible with the main thread running freely, such as a double-buffered
- // canvas that doesn't want to be triple-buffered across all three trees.
- virtual bool BlocksPendingCommit() const;
- // Returns true if anything in this tree blocksPendingCommit.
- bool BlocksPendingCommitRecursive() const;
-
virtual skia::RefPtr<SkPicture> GetPicture() const;
virtual bool CanClipSelf() const;
@@ -455,7 +448,11 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>,
// Called when there's been a change in layer structure. Implies both
// SetNeedsUpdate and SetNeedsCommit, but not SetNeedsPushProperties.
void SetNeedsFullTreeSync();
- bool IsPropertyChangeAllowed() const;
+
+ // Called when the next commit should wait until the pending tree is activated
+ // before finishing the commit and unblocking the main thread. Used to ensure
+ // unused resources on the impl thread are returned before commit completes.
+ void SetNextCommitWaitsForActivation();
void SetNeedsPushProperties();
void AddDependentNeedsPushProperties();
@@ -464,6 +461,8 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>,
return needs_push_properties() || descendant_needs_push_properties();
}
+ bool IsPropertyChangeAllowed() const;
+
// If this layer has a scroll parent, it removes |this| from its list of
// scroll children.
void RemoveFromScrollTree();
« no previous file with comments | « cc/layers/delegated_renderer_layer.cc ('k') | cc/layers/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698