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

Unified Diff: ui/aura/root_window.cc

Issue 10537028: aura: Drop unnecessary composites (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "" Created 8 years, 6 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 | « ui/aura/root_window.h ('k') | ui/compositor/compositor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/root_window.cc
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc
index 0538c6f3831a87dc43e11a3a373412b013725d9a..951219dcae6bd4a2431e79e9490bf0e1fa5a38cc 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -132,8 +132,7 @@ RootWindow::RootWindow(const gfx::Rect& initial_bounds)
mouse_move_hold_count_(0),
should_hold_mouse_moves_(false),
compositor_lock_(NULL),
- draw_on_compositor_unlock_(false),
- draw_trace_count_(0) {
+ draw_on_compositor_unlock_(false) {
SetName("RootWindow");
should_hold_mouse_moves_ = !CommandLine::ForCurrentProcess()->HasSwitch(
switches::kAuraDisableHoldMouseMoves);
@@ -232,21 +231,20 @@ bool RootWindow::ConfineCursorToWindow() {
}
void RootWindow::Draw() {
+ defer_draw_scheduling_ = false;
if (waiting_on_compositing_end_) {
draw_on_compositing_end_ = true;
- defer_draw_scheduling_ = false;
return;
}
if (compositor_lock_) {
draw_on_compositor_unlock_ = true;
- defer_draw_scheduling_ = false;
return;
}
waiting_on_compositing_end_ = true;
- TRACE_EVENT_ASYNC_BEGIN0("ui", "RootWindow::Draw", draw_trace_count_++);
+ TRACE_EVENT_ASYNC_BEGIN0("ui", "RootWindow::Draw",
+ compositor_->last_started_frame() + 1);
- defer_draw_scheduling_ = false;
compositor_->Draw(false);
}
@@ -591,7 +589,8 @@ void RootWindow::OnCompositingStarted(ui::Compositor*) {
}
void RootWindow::OnCompositingEnded(ui::Compositor*) {
- TRACE_EVENT_ASYNC_END0("ui", "RootWindow::Draw", draw_trace_count_);
+ TRACE_EVENT_ASYNC_END0("ui", "RootWindow::Draw",
+ compositor_->last_ended_frame());
waiting_on_compositing_end_ = false;
if (draw_on_compositing_end_) {
draw_on_compositing_end_ = false;
« no previous file with comments | « ui/aura/root_window.h ('k') | ui/compositor/compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698