OLD | NEW |
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 Loading... |
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 |
OLD | NEW |