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

Unified Diff: cc/layers/picture_image_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, 5 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/picture_image_layer.cc
diff --git a/cc/layers/picture_image_layer.cc b/cc/layers/picture_image_layer.cc
index a65ac8c9318c498a22ca904a00edc1ab5a7994ee..e8578ccbef480f81f40636ebc7b6ab4dcc2e72ec 100644
--- a/cc/layers/picture_image_layer.cc
+++ b/cc/layers/picture_image_layer.cc
@@ -24,8 +24,8 @@ scoped_ptr<LayerImpl> PictureImageLayer::CreateLayerImpl(
return PictureImageLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>();
}
-bool PictureImageLayer::DrawsContent() const {
- return !bitmap_.isNull() && PictureLayer::DrawsContent();
+bool PictureImageLayer::HasDrawableContent() const {
+ return !bitmap_.isNull() && PictureLayer::HasDrawableContent();
}
void PictureImageLayer::SetBitmap(const SkBitmap& bitmap) {
@@ -37,6 +37,7 @@ void PictureImageLayer::SetBitmap(const SkBitmap& bitmap) {
return;
bitmap_ = bitmap;
+ UpdateDrawsContent();
SetNeedsDisplay();
}

Powered by Google App Engine
This is Rietveld 408576698