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

Unified Diff: ui/aura/window.cc

Issue 8340014: Minimize resize calls (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 9 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 side-by-side diff with in-line comments
Download patch
Index: ui/aura/window.cc
diff --git a/ui/aura/window.cc b/ui/aura/window.cc
index 409454c74f712bf9ed75a72658de46ab923a15f0..ee2e3c943b92269b9ad33e4ef42b59fdbe9a41a2 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -436,6 +436,9 @@ Desktop* Window::GetDesktop() {
void Window::SetBoundsInternal(const gfx::Rect& new_bounds) {
const gfx::Rect old_bounds = bounds();
+ if (old_bounds == new_bounds)
+ return;
+
bool was_move = old_bounds.size() == new_bounds.size();
layer_->SetBounds(new_bounds);

Powered by Google App Engine
This is Rietveld 408576698