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

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

Issue 93593002: Fall back to software mode if Aura can't create a GL context (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Wire up fallback from Compositor::CreateOutputSurface to ContextFactory::CreateOutputSurface Created 7 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 | Annotate | Revision Log
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/compositor/test/default_context_factory.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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 void Compositor::Layout() { 498 void Compositor::Layout() {
499 // We're sending damage that will be addressed during this composite 499 // We're sending damage that will be addressed during this composite
500 // cycle, so we don't need to schedule another composite to address it. 500 // cycle, so we don't need to schedule another composite to address it.
501 disable_schedule_composite_ = true; 501 disable_schedule_composite_ = true;
502 if (root_layer_) 502 if (root_layer_)
503 root_layer_->SendDamagedRects(); 503 root_layer_->SendDamagedRects();
504 disable_schedule_composite_ = false; 504 disable_schedule_composite_ = false;
505 } 505 }
506 506
507 scoped_ptr<cc::OutputSurface> Compositor::CreateOutputSurface(bool fallback) { 507 scoped_ptr<cc::OutputSurface> Compositor::CreateOutputSurface(bool fallback) {
508 return ContextFactory::GetInstance()->CreateOutputSurface(this); 508 return ContextFactory::GetInstance()->CreateOutputSurface(this, fallback);
509 } 509 }
510 510
511 void Compositor::DidCommit() { 511 void Compositor::DidCommit() {
512 DCHECK(!IsLocked()); 512 DCHECK(!IsLocked());
513 FOR_EACH_OBSERVER(CompositorObserver, 513 FOR_EACH_OBSERVER(CompositorObserver,
514 observer_list_, 514 observer_list_,
515 OnCompositingDidCommit(this)); 515 OnCompositingDidCommit(this));
516 } 516 }
517 517
518 void Compositor::DidCommitAndDrawFrame() { 518 void Compositor::DidCommitAndDrawFrame() {
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 // CompositorObservers to be notified before starting another 616 // CompositorObservers to be notified before starting another
617 // draw cycle. 617 // draw cycle.
618 ScheduleDraw(); 618 ScheduleDraw();
619 } 619 }
620 FOR_EACH_OBSERVER(CompositorObserver, 620 FOR_EACH_OBSERVER(CompositorObserver,
621 observer_list_, 621 observer_list_,
622 OnCompositingEnded(this)); 622 OnCompositingEnded(this));
623 } 623 }
624 624
625 } // namespace ui 625 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/compositor/test/default_context_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698