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/compositor/compositor.h" | 5 #include "ui/compositor/compositor.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <deque> | 8 #include <deque> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 return; | 250 return; |
251 | 251 |
252 DCHECK_NE(swap_state_, SWAP_POSTED); | 252 DCHECK_NE(swap_state_, SWAP_POSTED); |
253 swap_state_ = SWAP_NONE; | 253 swap_state_ = SWAP_NONE; |
254 | 254 |
255 last_started_frame_++; | 255 last_started_frame_++; |
256 if (!IsLocked()) { | 256 if (!IsLocked()) { |
257 // TODO(nduca): Temporary while compositor calls | 257 // TODO(nduca): Temporary while compositor calls |
258 // compositeImmediately() directly. | 258 // compositeImmediately() directly. |
259 Layout(); | 259 Layout(); |
| 260 DLOG(INFO) << "host->Composite!"; |
260 host_->Composite(gfx::FrameTime::Now()); | 261 host_->Composite(gfx::FrameTime::Now()); |
261 } | 262 } |
262 if (swap_state_ == SWAP_NONE) | 263 if (swap_state_ == SWAP_NONE) |
263 NotifyEnd(); | 264 NotifyEnd(); |
264 } | 265 } |
265 | 266 |
266 void Compositor::ScheduleFullRedraw() { | 267 void Compositor::ScheduleFullRedraw() { |
267 host_->SetNeedsRedraw(); | 268 host_->SetNeedsRedraw(); |
268 } | 269 } |
269 | 270 |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 // CompositorObservers to be notified before starting another | 430 // CompositorObservers to be notified before starting another |
430 // draw cycle. | 431 // draw cycle. |
431 ScheduleDraw(); | 432 ScheduleDraw(); |
432 } | 433 } |
433 FOR_EACH_OBSERVER(CompositorObserver, | 434 FOR_EACH_OBSERVER(CompositorObserver, |
434 observer_list_, | 435 observer_list_, |
435 OnCompositingEnded(this)); | 436 OnCompositingEnded(this)); |
436 } | 437 } |
437 | 438 |
438 } // namespace ui | 439 } // namespace ui |
OLD | NEW |