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

Unified Diff: ash/rotator/screen_rotation_animator.cc

Issue 2872123002: Wallpaper resize extents compositor lock timeout. (Closed)
Patch Set: Created 3 years, 7 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 | ash/wallpaper/wallpaper_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/rotator/screen_rotation_animator.cc
diff --git a/ash/rotator/screen_rotation_animator.cc b/ash/rotator/screen_rotation_animator.cc
index 31a54537dd859ca1f3d8535baabb1442e81af0d6..9858e7eb3d12b6683115d14deaf11ba462dbf696 100644
--- a/ash/rotator/screen_rotation_animator.cc
+++ b/ash/rotator/screen_rotation_animator.cc
@@ -225,6 +225,11 @@ void ScreenRotationAnimator::SetRotation(
display::Display::Rotation old_rotation,
display::Display::Rotation new_rotation,
display::Display::RotationSource source) {
+ // Allow compositor locks to extend timeout, so that screen rotation only
+ // takes output copy after contents are properlly resized, such as wallpaper
+ // and ARC apps.
+ ui::Compositor* compositor = root_window_->layer()->GetCompositor();
+ compositor->set_allow_locks_to_extend_timeout(true);
Shell::Get()->display_manager()->SetDisplayRotation(display_id_, new_rotation,
source);
const display::Display display =
@@ -232,6 +237,7 @@ void ScreenRotationAnimator::SetRotation(
old_layer_tree_owner_->root()->SetTransform(
CreateScreenRotationOldLayerTransformForDisplay(old_rotation,
new_rotation, display));
+ compositor->set_allow_locks_to_extend_timeout(false);
oshima 2017/05/10 05:27:50 move this to 235, after SetDisplayRotation
wutao 2017/05/10 21:07:55 Done.
}
void ScreenRotationAnimator::RequestCopyScreenRotationContainerLayer(
« no previous file with comments | « no previous file | ash/wallpaper/wallpaper_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698