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

Unified Diff: cc/layers/heads_up_display_layer.cc

Issue 373113003: Keeping track of descendants that draw content instead of recalcualting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
Index: cc/layers/heads_up_display_layer.cc
diff --git a/cc/layers/heads_up_display_layer.cc b/cc/layers/heads_up_display_layer.cc
index ca63471e303d9a97271e2d280d2c4f6abbc5ea9e..b375a2bf00165f4fe5ec3b7448ab6099b169d151 100644
--- a/cc/layers/heads_up_display_layer.cc
+++ b/cc/layers/heads_up_display_layer.cc
@@ -16,7 +16,9 @@ scoped_refptr<HeadsUpDisplayLayer> HeadsUpDisplayLayer::Create() {
return make_scoped_refptr(new HeadsUpDisplayLayer());
}
-HeadsUpDisplayLayer::HeadsUpDisplayLayer() {}
+HeadsUpDisplayLayer::HeadsUpDisplayLayer() {
+ UpdateDrawsContent(HasDrawableContent());
+}
HeadsUpDisplayLayer::~HeadsUpDisplayLayer() {}
@@ -47,7 +49,9 @@ void HeadsUpDisplayLayer::PrepareForCalculateDrawProperties(
SetTransform(matrix);
}
-bool HeadsUpDisplayLayer::DrawsContent() const { return true; }
+bool HeadsUpDisplayLayer::HasDrawableContent() const {
+ return true;
+}
scoped_ptr<LayerImpl> HeadsUpDisplayLayer::CreateLayerImpl(
LayerTreeImpl* tree_impl) {
« no previous file with comments | « cc/layers/heads_up_display_layer.h ('k') | cc/layers/image_layer.h » ('j') | cc/layers/layer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698