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

Unified Diff: ash/rotator/screen_rotation_animator.cc

Issue 2872123002: Wallpaper resize extents compositor lock timeout. (Closed)
Patch Set: Add NON_EXPORTED_BASE back. 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..0198d8ab02ae676e6f98ffc318f0f986b1b9eaa4 100644
--- a/ash/rotator/screen_rotation_animator.cc
+++ b/ash/rotator/screen_rotation_animator.cc
@@ -225,8 +225,14 @@ 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);
+ compositor->set_allow_locks_to_extend_timeout(false);
const display::Display display =
Shell::Get()->display_manager()->GetDisplayForId(display_id_);
old_layer_tree_owner_->root()->SetTransform(
« 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