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

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

Issue 606113003: Revert of Make cc output surface creation async (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/compositor/compositor.h ('k') | no next file » | 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 334
335 void Compositor::Layout() { 335 void Compositor::Layout() {
336 // We're sending damage that will be addressed during this composite 336 // We're sending damage that will be addressed during this composite
337 // cycle, so we don't need to schedule another composite to address it. 337 // cycle, so we don't need to schedule another composite to address it.
338 disable_schedule_composite_ = true; 338 disable_schedule_composite_ = true;
339 if (root_layer_) 339 if (root_layer_)
340 root_layer_->SendDamagedRects(); 340 root_layer_->SendDamagedRects();
341 disable_schedule_composite_ = false; 341 disable_schedule_composite_ = false;
342 } 342 }
343 343
344 void Compositor::RequestNewOutputSurface(bool fallback) { 344 scoped_ptr<cc::OutputSurface> Compositor::CreateOutputSurface(bool fallback) {
345 host_->SetOutputSurface( 345 return context_factory_->CreateOutputSurface(this, fallback);
346 context_factory_->CreateOutputSurface(this, fallback));
347 } 346 }
348 347
349 void Compositor::DidCommit() { 348 void Compositor::DidCommit() {
350 DCHECK(!IsLocked()); 349 DCHECK(!IsLocked());
351 FOR_EACH_OBSERVER(CompositorObserver, 350 FOR_EACH_OBSERVER(CompositorObserver,
352 observer_list_, 351 observer_list_,
353 OnCompositingDidCommit(this)); 352 OnCompositingDidCommit(this));
354 } 353 }
355 354
356 void Compositor::DidCommitAndDrawFrame() { 355 void Compositor::DidCommitAndDrawFrame() {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « ui/compositor/compositor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698