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

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

Powered by Google App Engine
This is Rietveld 408576698