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 18 matching lines...) Expand all Loading... |
29 attribs.green_size = 8; | 29 attribs.green_size = 8; |
30 attribs.red_size = 8; | 30 attribs.red_size = 8; |
31 attribs.depth_size = 24; | 31 attribs.depth_size = 24; |
32 attribs.stencil_size = 8; | 32 attribs.stencil_size = 8; |
33 attribs.samples = 0; | 33 attribs.samples = 0; |
34 attribs.sample_buffers = 0; | 34 attribs.sample_buffers = 0; |
35 attribs.fail_if_major_perf_caveat = false; | 35 attribs.fail_if_major_perf_caveat = false; |
36 attribs.bind_generates_resource = false; | 36 attribs.bind_generates_resource = false; |
37 gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu; | 37 gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu; |
38 | 38 |
39 scoped_ptr<gpu::GLInProcessContext> context = make_scoped_ptr( | 39 scoped_ptr<gpu::GLInProcessContext> context = |
40 gpu::GLInProcessContext::Create(NULL, | 40 make_scoped_ptr(gpu::GLInProcessContext::Create( |
41 NULL, | 41 NULL, |
42 is_offscreen, | 42 NULL, |
43 gfx::kNullAcceleratedWidget, | 43 is_offscreen, |
44 gfx::Size(1, 1), | 44 gfx::kNullAcceleratedWidget, |
45 NULL, | 45 gfx::Size(1, 1), |
46 share_resources, | 46 NULL, |
47 attribs, | 47 share_resources, |
48 gpu_preference)); | 48 attribs, |
| 49 gpu_preference, |
| 50 gpu::GLInProcessContextSharedMemoryLimits())); |
49 | 51 |
50 DCHECK(context); | 52 DCHECK(context); |
51 return context.Pass(); | 53 return context.Pass(); |
52 } | 54 } |
53 | 55 |
54 TestInProcessContextProvider::TestInProcessContextProvider() | 56 TestInProcessContextProvider::TestInProcessContextProvider() |
55 : context_(CreateTestInProcessContext()) {} | 57 : context_(CreateTestInProcessContext()) {} |
56 | 58 |
57 TestInProcessContextProvider::~TestInProcessContextProvider() { | 59 TestInProcessContextProvider::~TestInProcessContextProvider() { |
58 } | 60 } |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 | 130 |
129 bool TestInProcessContextProvider::DestroyedOnMainThread() { return false; } | 131 bool TestInProcessContextProvider::DestroyedOnMainThread() { return false; } |
130 | 132 |
131 void TestInProcessContextProvider::SetLostContextCallback( | 133 void TestInProcessContextProvider::SetLostContextCallback( |
132 const LostContextCallback& lost_context_callback) {} | 134 const LostContextCallback& lost_context_callback) {} |
133 | 135 |
134 void TestInProcessContextProvider::SetMemoryPolicyChangedCallback( | 136 void TestInProcessContextProvider::SetMemoryPolicyChangedCallback( |
135 const MemoryPolicyChangedCallback& memory_policy_changed_callback) {} | 137 const MemoryPolicyChangedCallback& memory_policy_changed_callback) {} |
136 | 138 |
137 } // namespace cc | 139 } // namespace cc |
OLD | NEW |