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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 waiting_on_compositing_end_ = true; | 224 waiting_on_compositing_end_ = true; |
225 last_started_frame_++; | 225 last_started_frame_++; |
226 if (!IsLocked()) { | 226 if (!IsLocked()) { |
227 // TODO(nduca): Temporary while compositor calls | 227 // TODO(nduca): Temporary while compositor calls |
228 // compositeImmediately() directly. | 228 // compositeImmediately() directly. |
229 cc::BeginFrameArgs args = | 229 cc::BeginFrameArgs args = |
230 cc::BeginFrameArgs::Create(gfx::FrameTime::Now(), | 230 cc::BeginFrameArgs::Create(gfx::FrameTime::Now(), |
231 base::TimeTicks(), | 231 base::TimeTicks(), |
232 cc::BeginFrameArgs::DefaultInterval()); | 232 cc::BeginFrameArgs::DefaultInterval()); |
233 BeginMainFrame(args); | 233 BeginMainFrame(args); |
234 Layout(); | |
235 host_->Composite(args.frame_time); | 234 host_->Composite(args.frame_time); |
236 } | 235 } |
237 if (swap_state_ == SWAP_NONE) | 236 if (swap_state_ == SWAP_NONE) |
238 NotifyEnd(); | 237 NotifyEnd(); |
239 } | 238 } |
240 | 239 |
241 void Compositor::ScheduleFullRedraw() { | 240 void Compositor::ScheduleFullRedraw() { |
242 host_->SetNeedsRedraw(); | 241 host_->SetNeedsRedraw(); |
243 } | 242 } |
244 | 243 |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 // Call ScheduleDraw() instead of Draw() in order to allow other | 443 // Call ScheduleDraw() instead of Draw() in order to allow other |
445 // CompositorObservers to be notified before starting another | 444 // CompositorObservers to be notified before starting another |
446 // draw cycle. | 445 // draw cycle. |
447 ScheduleDraw(); | 446 ScheduleDraw(); |
448 } | 447 } |
449 FOR_EACH_OBSERVER( | 448 FOR_EACH_OBSERVER( |
450 CompositorObserver, observer_list_, OnCompositingEnded(this)); | 449 CompositorObserver, observer_list_, OnCompositingEnded(this)); |
451 } | 450 } |
452 | 451 |
453 } // namespace ui | 452 } // namespace ui |
OLD | NEW |