| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/aura/root_window.h" | 5 #include "ui/aura/root_window.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 } | 238 } |
| 239 if (compositor_lock_) { | 239 if (compositor_lock_) { |
| 240 draw_on_compositor_unlock_ = true; | 240 draw_on_compositor_unlock_ = true; |
| 241 defer_draw_scheduling_ = false; | 241 defer_draw_scheduling_ = false; |
| 242 return; | 242 return; |
| 243 } | 243 } |
| 244 waiting_on_compositing_end_ = true; | 244 waiting_on_compositing_end_ = true; |
| 245 | 245 |
| 246 TRACE_EVENT_ASYNC_BEGIN0("ui", "RootWindow::Draw", draw_trace_count_++); | 246 TRACE_EVENT_ASYNC_BEGIN0("ui", "RootWindow::Draw", draw_trace_count_++); |
| 247 | 247 |
| 248 defer_draw_scheduling_ = false; |
| 248 compositor_->Draw(false); | 249 compositor_->Draw(false); |
| 249 defer_draw_scheduling_ = false; | |
| 250 } | 250 } |
| 251 | 251 |
| 252 void RootWindow::ScheduleFullDraw() { | 252 void RootWindow::ScheduleFullDraw() { |
| 253 compositor_->ScheduleFullDraw(); | 253 compositor_->ScheduleFullDraw(); |
| 254 } | 254 } |
| 255 | 255 |
| 256 bool RootWindow::DispatchMouseEvent(MouseEvent* event) { | 256 bool RootWindow::DispatchMouseEvent(MouseEvent* event) { |
| 257 if (mouse_move_hold_count_) { | 257 if (mouse_move_hold_count_) { |
| 258 if (event->type() == ui::ET_MOUSE_DRAGGED || | 258 if (event->type() == ui::ET_MOUSE_DRAGGED || |
| 259 (event->flags() & ui::EF_IS_SYNTHESIZED)) { | 259 (event->flags() & ui::EF_IS_SYNTHESIZED)) { |
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1037 void RootWindow::UnlockCompositor() { | 1037 void RootWindow::UnlockCompositor() { |
| 1038 DCHECK(compositor_lock_); | 1038 DCHECK(compositor_lock_); |
| 1039 compositor_lock_ = NULL; | 1039 compositor_lock_ = NULL; |
| 1040 if (draw_on_compositor_unlock_) { | 1040 if (draw_on_compositor_unlock_) { |
| 1041 draw_on_compositor_unlock_ = false; | 1041 draw_on_compositor_unlock_ = false; |
| 1042 ScheduleDraw(); | 1042 ScheduleDraw(); |
| 1043 } | 1043 } |
| 1044 } | 1044 } |
| 1045 | 1045 |
| 1046 } // namespace aura | 1046 } // namespace aura |
| OLD | NEW |