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

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

Issue 348093004: Make cc output surface creation async (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 238
239 void Compositor::Layout() { 239 void Compositor::Layout() {
240 // We're sending damage that will be addressed during this composite 240 // We're sending damage that will be addressed during this composite
241 // cycle, so we don't need to schedule another composite to address it. 241 // cycle, so we don't need to schedule another composite to address it.
242 disable_schedule_composite_ = true; 242 disable_schedule_composite_ = true;
243 if (root_layer_) 243 if (root_layer_)
244 root_layer_->SendDamagedRects(); 244 root_layer_->SendDamagedRects();
245 disable_schedule_composite_ = false; 245 disable_schedule_composite_ = false;
246 } 246 }
247 247
248 scoped_ptr<cc::OutputSurface> Compositor::CreateOutputSurface(bool fallback) { 248 void Compositor::RequestNewOutputSurface(bool fallback) {
249 return context_factory_->CreateOutputSurface(this, fallback); 249 host_->SetOutputSurface(
250 context_factory_->CreateOutputSurface(this, fallback));
250 } 251 }
251 252
252 void Compositor::DidCommit() { 253 void Compositor::DidCommit() {
253 DCHECK(!IsLocked()); 254 DCHECK(!IsLocked());
254 FOR_EACH_OBSERVER(CompositorObserver, 255 FOR_EACH_OBSERVER(CompositorObserver,
255 observer_list_, 256 observer_list_,
256 OnCompositingDidCommit(this)); 257 OnCompositingDidCommit(this));
257 } 258 }
258 259
259 void Compositor::DidCommitAndDrawFrame() { 260 void Compositor::DidCommitAndDrawFrame() {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 observer_list_, 310 observer_list_,
310 OnCompositingLockStateChanged(this)); 311 OnCompositingLockStateChanged(this));
311 } 312 }
312 313
313 void Compositor::CancelCompositorLock() { 314 void Compositor::CancelCompositorLock() {
314 if (compositor_lock_) 315 if (compositor_lock_)
315 compositor_lock_->CancelLock(); 316 compositor_lock_->CancelLock();
316 } 317 }
317 318
318 } // namespace ui 319 } // namespace ui
OLDNEW
« content/browser/renderer_host/compositor_impl_android.cc ('K') | « ui/compositor/compositor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698