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

Side by Side Diff: ui/compositor/test/default_context_factory.h

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.cc ('k') | ui/compositor/test/default_context_factory.cc » ('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 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 #ifndef UI_COMPOSITOR_TEST_DEFAULT_CONTEXT_FACTORY_H_ 5 #ifndef UI_COMPOSITOR_TEST_DEFAULT_CONTEXT_FACTORY_H_
6 #define UI_COMPOSITOR_TEST_DEFAULT_CONTEXT_FACTORY_H_ 6 #define UI_COMPOSITOR_TEST_DEFAULT_CONTEXT_FACTORY_H_
7 7
8 #include "ui/compositor/compositor.h" 8 #include "ui/compositor/compositor.h"
9 9
10 namespace webkit { 10 namespace webkit {
11 namespace gpu { 11 namespace gpu {
12 class ContextProviderInProcess; 12 class ContextProviderInProcess;
13 } 13 }
14 } 14 }
15 15
16 namespace ui { 16 namespace ui {
17 17
18 // The default factory that creates in-process contexts. 18 // The default factory that creates in-process contexts.
19 class DefaultContextFactory : public ContextFactory { 19 class DefaultContextFactory : public ContextFactory {
20 public: 20 public:
21 DefaultContextFactory(); 21 DefaultContextFactory();
22 virtual ~DefaultContextFactory(); 22 virtual ~DefaultContextFactory();
23 23
24 // ContextFactory implementation 24 // ContextFactory implementation
25 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface( 25 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(
26 Compositor* compositor) OVERRIDE; 26 Compositor* compositor, bool software_fallback) OVERRIDE;
27 27
28 virtual scoped_refptr<Reflector> CreateReflector( 28 virtual scoped_refptr<Reflector> CreateReflector(
29 Compositor* compositor, 29 Compositor* compositor,
30 Layer* layer) OVERRIDE; 30 Layer* layer) OVERRIDE;
31 virtual void RemoveReflector(scoped_refptr<Reflector> reflector) OVERRIDE; 31 virtual void RemoveReflector(scoped_refptr<Reflector> reflector) OVERRIDE;
32 32
33 virtual scoped_refptr<cc::ContextProvider> 33 virtual scoped_refptr<cc::ContextProvider>
34 OffscreenCompositorContextProvider() OVERRIDE; 34 OffscreenCompositorContextProvider() OVERRIDE;
35 virtual scoped_refptr<cc::ContextProvider> 35 virtual scoped_refptr<cc::ContextProvider>
36 SharedMainThreadContextProvider() OVERRIDE; 36 SharedMainThreadContextProvider() OVERRIDE;
37 virtual void RemoveCompositor(Compositor* compositor) OVERRIDE; 37 virtual void RemoveCompositor(Compositor* compositor) OVERRIDE;
38 virtual bool DoesCreateTestContexts() OVERRIDE; 38 virtual bool DoesCreateTestContexts() OVERRIDE;
39 39
40 bool Initialize(); 40 bool Initialize();
41 41
42 private: 42 private:
43 scoped_refptr<webkit::gpu::ContextProviderInProcess> 43 scoped_refptr<webkit::gpu::ContextProviderInProcess>
44 offscreen_compositor_contexts_; 44 offscreen_compositor_contexts_;
45 scoped_refptr<webkit::gpu::ContextProviderInProcess> 45 scoped_refptr<webkit::gpu::ContextProviderInProcess>
46 shared_main_thread_contexts_; 46 shared_main_thread_contexts_;
47 47
48 DISALLOW_COPY_AND_ASSIGN(DefaultContextFactory); 48 DISALLOW_COPY_AND_ASSIGN(DefaultContextFactory);
49 }; 49 };
50 50
51 } // namespace ui 51 } // namespace ui
52 52
53 #endif // UI_COMPOSITOR_TEST_DEFAULT_CONTEXT_FACTORY_H_ 53 #endif // UI_COMPOSITOR_TEST_DEFAULT_CONTEXT_FACTORY_H_
OLDNEW
« no previous file with comments | « ui/compositor/compositor.cc ('k') | ui/compositor/test/default_context_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698