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

Side by Side Diff: ui/compositor/layer.cc

Issue 2383263002: Generalize layer mirroring for phantom windows (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/compositor/layer.h" 5 #include "ui/compositor/layer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 909
910 if (was_move) { 910 if (was_move) {
911 // Don't schedule a draw if we're invisible. We'll schedule one 911 // Don't schedule a draw if we're invisible. We'll schedule one
912 // automatically when we get visible. 912 // automatically when we get visible.
913 if (IsDrawn()) 913 if (IsDrawn())
914 ScheduleDraw(); 914 ScheduleDraw();
915 } else { 915 } else {
916 // Always schedule a paint, even if we're invisible. 916 // Always schedule a paint, even if we're invisible.
917 SchedulePaint(gfx::Rect(bounds.size())); 917 SchedulePaint(gfx::Rect(bounds.size()));
918 } 918 }
919
920 FOR_EACH_OBSERVER(LayerObserver, observer_list_, BoundsChanged(this));
919 } 921 }
920 922
921 void Layer::SetTransformFromAnimation(const gfx::Transform& transform) { 923 void Layer::SetTransformFromAnimation(const gfx::Transform& transform) {
922 cc_layer_->SetTransform(transform); 924 cc_layer_->SetTransform(transform);
923 } 925 }
924 926
925 void Layer::SetOpacityFromAnimation(float opacity) { 927 void Layer::SetOpacityFromAnimation(float opacity) {
926 cc_layer_->SetOpacity(opacity); 928 cc_layer_->SetOpacity(opacity);
927 ScheduleDraw(); 929 ScheduleDraw();
928 } 930 }
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 if (animator_) { 1072 if (animator_) {
1071 animator_->ResetCompositor(compositor); 1073 animator_->ResetCompositor(compositor);
1072 animator_->RemoveFromCollection(collection); 1074 animator_->RemoveFromCollection(collection);
1073 } 1075 }
1074 1076
1075 for (auto* child : children_) 1077 for (auto* child : children_)
1076 child->ResetCompositorForAnimatorsInTree(compositor); 1078 child->ResetCompositorForAnimatorsInTree(compositor);
1077 } 1079 }
1078 1080
1079 } // namespace ui 1081 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698