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 "cc/test/test_in_process_context_provider.h" | 5 #include "cc/test/test_in_process_context_provider.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "gpu/GLES2/gl2extchromium.h" | 8 #include "gpu/GLES2/gl2extchromium.h" |
9 #include "gpu/command_buffer/client/gl_in_process_context.h" | 9 #include "gpu/command_buffer/client/gl_in_process_context.h" |
10 #include "gpu/command_buffer/client/gles2_implementation.h" | 10 #include "gpu/command_buffer/client/gles2_implementation.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 attribs.green_size = 8; | 28 attribs.green_size = 8; |
29 attribs.red_size = 8; | 29 attribs.red_size = 8; |
30 attribs.depth_size = 24; | 30 attribs.depth_size = 24; |
31 attribs.stencil_size = 8; | 31 attribs.stencil_size = 8; |
32 attribs.samples = 0; | 32 attribs.samples = 0; |
33 attribs.sample_buffers = 0; | 33 attribs.sample_buffers = 0; |
34 attribs.fail_if_major_perf_caveat = false; | 34 attribs.fail_if_major_perf_caveat = false; |
35 gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu; | 35 gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu; |
36 | 36 |
37 scoped_ptr<gpu::GLInProcessContext> context = make_scoped_ptr( | 37 scoped_ptr<gpu::GLInProcessContext> context = make_scoped_ptr( |
38 gpu::GLInProcessContext::CreateContext(is_offscreen, | 38 gpu::GLInProcessContext::Create(NULL, |
39 gfx::AcceleratedWidget(), | 39 NULL, |
40 gfx::Size(1, 1), | 40 is_offscreen, |
41 share_resources, | 41 gfx::kNullAcceleratedWidget, |
42 attribs, | 42 gfx::Size(1, 1), |
43 gpu_preference)); | 43 NULL, |
| 44 share_resources, |
| 45 attribs, |
| 46 gpu_preference)); |
| 47 |
44 DCHECK(context); | 48 DCHECK(context); |
45 return context.Pass(); | 49 return context.Pass(); |
46 } | 50 } |
47 | 51 |
48 TestInProcessContextProvider::TestInProcessContextProvider() | 52 TestInProcessContextProvider::TestInProcessContextProvider() |
49 : context_(CreateTestInProcessContext()) {} | 53 : context_(CreateTestInProcessContext()) {} |
50 | 54 |
51 TestInProcessContextProvider::~TestInProcessContextProvider() { | 55 TestInProcessContextProvider::~TestInProcessContextProvider() { |
52 } | 56 } |
53 | 57 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 126 |
123 bool TestInProcessContextProvider::DestroyedOnMainThread() { return false; } | 127 bool TestInProcessContextProvider::DestroyedOnMainThread() { return false; } |
124 | 128 |
125 void TestInProcessContextProvider::SetLostContextCallback( | 129 void TestInProcessContextProvider::SetLostContextCallback( |
126 const LostContextCallback& lost_context_callback) {} | 130 const LostContextCallback& lost_context_callback) {} |
127 | 131 |
128 void TestInProcessContextProvider::SetMemoryPolicyChangedCallback( | 132 void TestInProcessContextProvider::SetMemoryPolicyChangedCallback( |
129 const MemoryPolicyChangedCallback& memory_policy_changed_callback) {} | 133 const MemoryPolicyChangedCallback& memory_policy_changed_callback) {} |
130 | 134 |
131 } // namespace cc | 135 } // namespace cc |
OLD | NEW |