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

Side by Side Diff: ui/compositor/compositor.cc

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
« no previous file with comments | « tools/valgrind/valgrind_test.py ('k') | ui/compositor/layer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 247
248 DCHECK_NE(swap_state_, SWAP_POSTED); 248 DCHECK_NE(swap_state_, SWAP_POSTED);
249 swap_state_ = SWAP_NONE; 249 swap_state_ = SWAP_NONE;
250 250
251 waiting_on_compositing_end_ = true; 251 waiting_on_compositing_end_ = true;
252 last_started_frame_++; 252 last_started_frame_++;
253 if (!IsLocked()) { 253 if (!IsLocked()) {
254 // TODO(nduca): Temporary while compositor calls 254 // TODO(nduca): Temporary while compositor calls
255 // compositeImmediately() directly. 255 // compositeImmediately() directly.
256 cc::BeginFrameArgs args = cc::BeginFrameArgs::Create( 256 cc::BeginFrameArgs args = cc::BeginFrameArgs::Create(
257 gfx::FrameTime::Now(), base::TimeTicks(), 257 BEGINFRAME_FROM_HERE, gfx::FrameTime::Now(), base::TimeTicks(),
258 cc::BeginFrameArgs::DefaultInterval(), cc::BeginFrameArgs::SYNCHRONOUS); 258 cc::BeginFrameArgs::DefaultInterval(), cc::BeginFrameArgs::SYNCHRONOUS);
259 BeginMainFrame(args); 259 BeginMainFrame(args);
260 host_->Composite(args.frame_time); 260 host_->Composite(args.frame_time);
261 } 261 }
262 if (swap_state_ == SWAP_NONE) 262 if (swap_state_ == SWAP_NONE)
263 NotifyEnd(); 263 NotifyEnd();
264 } 264 }
265 265
266 void Compositor::ScheduleFullRedraw() { 266 void Compositor::ScheduleFullRedraw() {
267 host_->SetNeedsRedraw(); 267 host_->SetNeedsRedraw();
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 // Call ScheduleDraw() instead of Draw() in order to allow other 480 // Call ScheduleDraw() instead of Draw() in order to allow other
481 // CompositorObservers to be notified before starting another 481 // CompositorObservers to be notified before starting another
482 // draw cycle. 482 // draw cycle.
483 ScheduleDraw(); 483 ScheduleDraw();
484 } 484 }
485 FOR_EACH_OBSERVER( 485 FOR_EACH_OBSERVER(
486 CompositorObserver, observer_list_, OnCompositingEnded(this)); 486 CompositorObserver, observer_list_, OnCompositingEnded(this));
487 } 487 }
488 488
489 } // namespace ui 489 } // namespace ui
OLDNEW
« no previous file with comments | « tools/valgrind/valgrind_test.py ('k') | ui/compositor/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698