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

Unified Diff: views/view.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/view.cc
diff --git a/views/view.cc b/views/view.cc
index 75a93b1f4602f55fc203202937bc158a52184f42..444068f73d188d6dbff8ff341629090ae7c3c143 100644
--- a/views/view.cc
+++ b/views/view.cc
@@ -6,6 +6,7 @@
#include <algorithm>
+#include "base/debug/trace_event.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
@@ -107,6 +108,7 @@ View::View()
parent_(NULL),
visible_(true),
enabled_(true),
+ painting_enabled_(true),
registered_for_visible_bounds_notification_(false),
clip_x_(0.0),
clip_y_(0.0),
@@ -685,7 +687,7 @@ void View::SchedulePaint() {
}
void View::SchedulePaintInRect(const gfx::Rect& rect) {
- if (!IsVisible())
+ if (!IsVisible() || !painting_enabled_)
return;
MarkLayerDirty();
@@ -693,7 +695,8 @@ void View::SchedulePaintInRect(const gfx::Rect& rect) {
}
void View::Paint(gfx::Canvas* canvas) {
- if (!IsVisible())
+ TRACE_EVENT0("View", "Paint");
+ if (!IsVisible() || !painting_enabled_)
sky 2011/08/25 21:10:12 You also need to update SchedulePaintInternal.
return;
ScopedCanvas scoped_canvas(NULL);
« views/animation/paint_lock.h ('K') | « views/view.h ('k') | views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698