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

Unified Diff: ui/compositor/layer.cc

Issue 2749993002: compositor: Change how attributes are set during ui::Layer::Clone(). (Closed)
Patch Set: test Created 3 years, 9 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 | « no previous file | ui/compositor/layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer.cc
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
index 977a0ffbae085f562db233902317b40bf4a06153..1b1d8ed043d37c0fdf19b3a6a80487491132f941 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -158,16 +158,6 @@ Layer::~Layer() {
std::unique_ptr<Layer> Layer::Clone() const {
auto clone = base::MakeUnique<Layer>(type_);
- clone->SetTransform(GetTargetTransform());
- clone->SetBounds(bounds_);
- clone->SetSubpixelPositionOffset(subpixel_position_offset_);
- clone->SetMasksToBounds(GetMasksToBounds());
- clone->SetOpacity(GetTargetOpacity());
- clone->SetVisible(GetTargetVisibility());
- clone->SetFillsBoundsOpaquely(fills_bounds_opaquely_);
- clone->SetFillsBoundsCompletely(fills_bounds_completely_);
- clone->set_name(name_);
-
// Background filters.
clone->SetBackgroundBlur(background_blur_radius_);
clone->SetBackgroundZoom(zoom_, zoom_inset_);
@@ -187,6 +177,17 @@ std::unique_ptr<Layer> Layer::Clone() const {
} else if (type_ == LAYER_SOLID_COLOR) {
clone->SetColor(GetTargetColor());
}
+
+ clone->SetTransform(GetTargetTransform());
+ clone->SetBounds(bounds_);
+ clone->SetSubpixelPositionOffset(subpixel_position_offset_);
+ clone->SetMasksToBounds(GetMasksToBounds());
+ clone->SetOpacity(GetTargetOpacity());
+ clone->SetVisible(GetTargetVisibility());
+ clone->SetFillsBoundsOpaquely(fills_bounds_opaquely_);
+ clone->SetFillsBoundsCompletely(fills_bounds_completely_);
+ clone->set_name(name_);
+
return clone;
}
« no previous file with comments | « no previous file | ui/compositor/layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698