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

Unified Diff: ash/wallpaper/wallpaper_controller.cc

Issue 2848883004: Add screen rotation animator lock. (Closed)
Patch Set: Created 3 years, 8 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 | « ash/wallpaper/wallpaper_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wallpaper/wallpaper_controller.cc
diff --git a/ash/wallpaper/wallpaper_controller.cc b/ash/wallpaper/wallpaper_controller.cc
index 15f2cc03cdf7ace5fa513b7cf1dcb48d6ec4e02f..d258a514c102568f735b55cf4f3b71259eaccfbf 100644
--- a/ash/wallpaper/wallpaper_controller.cc
+++ b/ash/wallpaper/wallpaper_controller.cc
@@ -10,6 +10,7 @@
#include "ash/ash_switches.h"
#include "ash/public/cpp/shell_window_ids.h"
#include "ash/root_window_controller.h"
+#include "ash/rotator/screen_rotation_animator_lock.h"
#include "ash/session/session_controller.h"
#include "ash/shell.h"
#include "ash/shell_port.h"
@@ -153,6 +154,8 @@ void WallpaperController::SetWallpaperImage(const gfx::ImageSkia& image,
current_wallpaper_.reset(new wallpaper::WallpaperResizer(
image, GetMaxDisplaySizeInNative(), layout, task_runner_));
current_wallpaper_->AddObserver(this);
+ if (screen_rotation_animator_lock_)
+ screen_rotation_animator_lock_->lock();
current_wallpaper_->StartResize();
for (auto& observer : observers_)
@@ -283,6 +286,8 @@ void WallpaperController::OnColorCalculationComplete() {
const SkColor color = color_calculator_->prominent_color();
color_calculator_.reset();
SetProminentColor(color);
+ if (screen_rotation_animator_lock_)
+ screen_rotation_animator_lock_->unlock();
}
void WallpaperController::InstallDesktopController(WmWindow* root_window) {
« no previous file with comments | « ash/wallpaper/wallpaper_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698