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

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: 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/picture_layer.cc
diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc
index 8b8558ce7f4e59654cd85c257b19755ec04c469e..4b65b6b55f290a7c65e47ffab8334302fc163849 100644
--- a/cc/layers/picture_layer.cc
+++ b/cc/layers/picture_layer.cc
@@ -33,10 +33,17 @@ scoped_ptr<LayerImpl> PictureLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) {
return PictureLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>();
}
+void PictureLayer::SetSolidColorPropertiesTo(
+ PictureLayerImpl* layer_impl) const {
+ layer_impl->SetSolidColorState(pile_->IsSolidColor(), pile_->GetSolidColor());
+}
+
void PictureLayer::PushPropertiesTo(LayerImpl* base_layer) {
Layer::PushPropertiesTo(base_layer);
PictureLayerImpl* layer_impl = static_cast<PictureLayerImpl*>(base_layer);
+ SetSolidColorPropertiesTo(layer_impl);
vmpstr 2014/08/29 06:49:14 Why not just layer_impl->SetSolidColorState(...) d
hendrikw 2014/08/29 14:03:21 see prev comment
vmpstr 2014/08/29 14:20:44 Acknowledged.
+
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