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

Unified Diff: ui/compositor/layer_owner.cc

Issue 231193002: Makes recreating a layer inherit target visibility and opacity (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | « ui/compositor/compositor.gyp ('k') | ui/compositor/layer_owner_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer_owner.cc
diff --git a/ui/compositor/layer_owner.cc b/ui/compositor/layer_owner.cc
index a797a0c5a25330426cf3f5dfdebe7cf8b4ab2cd0..f72666bb199d8dc37f502c6c4b862850c165790d 100644
--- a/ui/compositor/layer_owner.cc
+++ b/ui/compositor/layer_owner.cc
@@ -38,7 +38,8 @@ scoped_ptr<Layer> LayerOwner::RecreateLayer() {
const gfx::Rect layer_bounds(old_layer->bounds());
Layer* new_layer = new ui::Layer(old_layer->type());
SetLayer(new_layer);
- new_layer->SetVisible(old_layer->visible());
+ new_layer->SetVisible(old_layer->GetTargetVisibility());
+ new_layer->SetOpacity(old_layer->GetTargetOpacity());
new_layer->set_scale_content(old_layer->scale_content());
new_layer->SetBounds(layer_bounds);
new_layer->SetMasksToBounds(old_layer->GetMasksToBounds());
« no previous file with comments | « ui/compositor/compositor.gyp ('k') | ui/compositor/layer_owner_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698