OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ash/rotator/screen_rotation_animator.h" | 5 #include "ash/rotator/screen_rotation_animator.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/display/window_tree_host_manager.h" | 8 #include "ash/display/window_tree_host_manager.h" |
9 #include "ash/public/cpp/shell_window_ids.h" | 9 #include "ash/public/cpp/shell_window_ids.h" |
10 #include "ash/rotator/screen_rotation_animation.h" | 10 #include "ash/rotator/screen_rotation_animation.h" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 black_mask_layer->SetColor(SK_ColorBLACK); | 143 black_mask_layer->SetColor(SK_ColorBLACK); |
144 std::unique_ptr<ui::LayerOwner> black_mask_layer_owner = | 144 std::unique_ptr<ui::LayerOwner> black_mask_layer_owner = |
145 base::MakeUnique<ui::LayerOwner>(); | 145 base::MakeUnique<ui::LayerOwner>(); |
146 black_mask_layer_owner->SetLayer(std::move(black_mask_layer)); | 146 black_mask_layer_owner->SetLayer(std::move(black_mask_layer)); |
147 return black_mask_layer_owner; | 147 return black_mask_layer_owner; |
148 } | 148 } |
149 | 149 |
150 class ScreenRotationAnimationMetricsReporter | 150 class ScreenRotationAnimationMetricsReporter |
151 : public ui::AnimationMetricsReporter { | 151 : public ui::AnimationMetricsReporter { |
152 public: | 152 public: |
153 ScreenRotationAnimationMetricsReporter() {} | 153 ScreenRotationAnimationMetricsReporter() = default; |
154 ~ScreenRotationAnimationMetricsReporter() override {} | 154 ~ScreenRotationAnimationMetricsReporter() override = default; |
155 | 155 |
156 void Report(int value) override { | 156 void Report(int value) override { |
157 UMA_HISTOGRAM_PERCENTAGE("Ash.Rotation.AnimationSmoothness", value); | 157 UMA_HISTOGRAM_PERCENTAGE("Ash.Rotation.AnimationSmoothness", value); |
158 } | 158 } |
159 | 159 |
160 private: | 160 private: |
161 DISALLOW_COPY_AND_ASSIGN(ScreenRotationAnimationMetricsReporter); | 161 DISALLOW_COPY_AND_ASSIGN(ScreenRotationAnimationMetricsReporter); |
162 }; | 162 }; |
163 | 163 |
164 } // namespace | 164 } // namespace |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 // the rotation request comes before the copy request finished. | 484 // the rotation request comes before the copy request finished. |
485 if (old_layer_tree_owner_) | 485 if (old_layer_tree_owner_) |
486 old_layer_tree_owner_->root()->GetAnimator()->StopAnimating(); | 486 old_layer_tree_owner_->root()->GetAnimator()->StopAnimating(); |
487 if (new_layer_tree_owner_) | 487 if (new_layer_tree_owner_) |
488 new_layer_tree_owner_->root()->GetAnimator()->StopAnimating(); | 488 new_layer_tree_owner_->root()->GetAnimator()->StopAnimating(); |
489 if (IsDisplayIdValid(display_id_) && black_mask_layer_owner_) | 489 if (IsDisplayIdValid(display_id_) && black_mask_layer_owner_) |
490 root_window_->layer()->Remove(black_mask_layer_owner_->layer()); | 490 root_window_->layer()->Remove(black_mask_layer_owner_->layer()); |
491 } | 491 } |
492 | 492 |
493 } // namespace ash | 493 } // namespace ash |
OLD | NEW |