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

Unified Diff: ui/aura/root_window.cc

Issue 10453117: Tighter sync and faster ACK on SwapBuffers/PostSubBuffers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 7 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/root_window.cc
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc
index 3bd7ccae8bd9d007cd2bbbf570078efee112c43e..60f9f1fa47db6caafbfe476e2a38f289da8b9169 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -131,8 +131,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);
@@ -243,9 +242,9 @@ void RootWindow::Draw() {
}
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_id() + 1);
- defer_draw_scheduling_ = false;
compositor_->Draw(false);
}
@@ -589,8 +588,13 @@ void RootWindow::ScheduleDraw() {
void RootWindow::OnCompositingStarted(ui::Compositor*) {
}
+void RootWindow::OnCompositingWillEnd(ui::Compositor*) {
+ defer_draw_scheduling_ = false;
piman 2012/06/04 18:20:39 A possible issue with this is that if other observ
jonathan.backer 2012/06/05 13:35:58 Your point is taken. It's a potential problem. I
+}
+
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_id());
waiting_on_compositing_end_ = false;
if (draw_on_compositing_end_) {
draw_on_compositing_end_ = false;

Powered by Google App Engine
This is Rietveld 408576698