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

Unified Diff: cc/layers/picture_layer.cc

Issue 519583003: Use the solid color detection to create solid layers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a unit test for solid color on picturelayerimpl Created 6 years, 3 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_layer.cc
diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc
index 4207aa248142ba0174101773a7b38bd89ff61af4..68c416011b336f2db8ed6a50626af9bcfa1296af 100644
--- a/cc/layers/picture_layer.cc
+++ b/cc/layers/picture_layer.cc
@@ -36,6 +36,8 @@ void PictureLayer::PushPropertiesTo(LayerImpl* base_layer) {
Layer::PushPropertiesTo(base_layer);
PictureLayerImpl* layer_impl = static_cast<PictureLayerImpl*>(base_layer);
+ layer_impl->SetSolidColorState(pile_->IsSolidColor(), pile_->GetSolidColor());
danakj 2014/09/10 18:40:50 can the layerimpl not pull this off its own pile i
hendrikw 2014/09/11 00:27:40 PLI doesn't know if it's solid or not (only PL kno
danakj 2014/09/11 23:36:37 Can't the test set the bool in the pile? Take a lo
+
if (layer_impl->bounds().IsEmpty()) {
// Update may not get called for an empty layer, so resize here instead.
// Using layer_impl because either bounds() or paint_properties().bounds

Powered by Google App Engine
This is Rietveld 408576698