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

Unified Diff: cc/layers/surface_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
« no previous file with comments | « cc/layers/surface_layer.h ('k') | cc/layers/texture_layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/surface_layer.cc
diff --git a/cc/layers/surface_layer.cc b/cc/layers/surface_layer.cc
index f345b7423ddbe58e0665bd8d5740a343ca9ef08e..3ca179f2b8a052ed0638c3101a744a8b034945f2 100644
--- a/cc/layers/surface_layer.cc
+++ b/cc/layers/surface_layer.cc
@@ -19,6 +19,7 @@ SurfaceLayer::~SurfaceLayer() {}
void SurfaceLayer::SetSurfaceId(SurfaceId surface_id) {
surface_id_ = surface_id;
+ UpdateDrawsContent(HasDrawableContent());
SetNeedsPushProperties();
}
@@ -26,8 +27,8 @@ scoped_ptr<LayerImpl> SurfaceLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) {
return SurfaceLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>();
}
-bool SurfaceLayer::DrawsContent() const {
- return !surface_id_.is_null() && Layer::DrawsContent();
+bool SurfaceLayer::HasDrawableContent() const {
+ return !surface_id_.is_null() && Layer::HasDrawableContent();
}
void SurfaceLayer::PushPropertiesTo(LayerImpl* layer) {
« no previous file with comments | « cc/layers/surface_layer.h ('k') | cc/layers/texture_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698