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

Unified Diff: views/animation/paint_lock.cc

Issue 7273073: Animated Rotation (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Moved screen rotation code under touch; use lock object to disable painting Created 9 years, 4 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: views/animation/paint_lock.cc
diff --git a/views/animation/paint_lock.cc b/views/animation/paint_lock.cc
new file mode 100644
index 0000000000000000000000000000000000000000..857f1c5513a1ffea5aaaf9c20dfb8b1c4d2a2f89
--- /dev/null
+++ b/views/animation/paint_lock.cc
@@ -0,0 +1,19 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "views/animation/paint_lock.h"
+
+#include "views/view.h"
+
+namespace views {
+
+PaintLock::PaintLock(View* view) : view_(view) {
+ view_->set_painting_enabled(false);
+}
+
+PaintLock::~PaintLock() {
+ view_->set_painting_enabled(true);
+}
+
+} // namespace views

Powered by Google App Engine
This is Rietveld 408576698