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

Side by Side Diff: ui/compositor/test/test_context_factory.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/test/test_context_factory.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/test/test_context_factory.h" 5 #include "ui/compositor/test/test_context_factory.h"
6 6
7 #include "cc/output/output_surface.h" 7 #include "cc/output/output_surface.h"
8 #include "cc/test/test_context_provider.h" 8 #include "cc/test/test_context_provider.h"
9 #include "ui/compositor/reflector.h" 9 #include "ui/compositor/reflector.h"
10 10
11 namespace ui { 11 namespace ui {
12 12
13 TestContextFactory::TestContextFactory() {} 13 TestContextFactory::TestContextFactory() {}
14 14
15 TestContextFactory::~TestContextFactory() {} 15 TestContextFactory::~TestContextFactory() {}
16 16
17 scoped_ptr<cc::OutputSurface> TestContextFactory::CreateOutputSurface( 17 scoped_ptr<cc::OutputSurface> TestContextFactory::CreateOutputSurface(
18 Compositor* compositor) { 18 Compositor* compositor, bool software_fallback) {
19 DCHECK(!software_fallback);
19 return make_scoped_ptr( 20 return make_scoped_ptr(
20 new cc::OutputSurface(cc::TestContextProvider::Create())); 21 new cc::OutputSurface(cc::TestContextProvider::Create()));
21 } 22 }
22 23
23 scoped_refptr<Reflector> TestContextFactory::CreateReflector( 24 scoped_refptr<Reflector> TestContextFactory::CreateReflector(
24 Compositor* mirrored_compositor, 25 Compositor* mirrored_compositor,
25 Layer* mirroring_layer) { 26 Layer* mirroring_layer) {
26 return new Reflector(); 27 return new Reflector();
27 } 28 }
28 29
(...skipping 27 matching lines...) Expand all
56 57
57 return shared_main_thread_contexts_; 58 return shared_main_thread_contexts_;
58 } 59 }
59 60
60 void TestContextFactory::RemoveCompositor(Compositor* compositor) { 61 void TestContextFactory::RemoveCompositor(Compositor* compositor) {
61 } 62 }
62 63
63 bool TestContextFactory::DoesCreateTestContexts() { return true; } 64 bool TestContextFactory::DoesCreateTestContexts() { return true; }
64 65
65 } // namespace ui 66 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/test/test_context_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698