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 <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 attribs.alpha_size = -1; | 38 attribs.alpha_size = -1; |
39 attribs.depth_size = 24; | 39 attribs.depth_size = 24; |
40 attribs.stencil_size = 8; | 40 attribs.stencil_size = 8; |
41 attribs.samples = 0; | 41 attribs.samples = 0; |
42 attribs.sample_buffers = 0; | 42 attribs.sample_buffers = 0; |
43 attribs.fail_if_major_perf_caveat = false; | 43 attribs.fail_if_major_perf_caveat = false; |
44 attribs.bind_generates_resource = false; | 44 attribs.bind_generates_resource = false; |
45 | 45 |
46 std::unique_ptr<gpu::GLInProcessContext> context = | 46 std::unique_ptr<gpu::GLInProcessContext> context = |
47 base::WrapUnique(gpu::GLInProcessContext::Create( | 47 base::WrapUnique(gpu::GLInProcessContext::Create( |
48 nullptr, nullptr, is_offscreen, gfx::kNullAcceleratedWidget, | 48 nullptr, nullptr, is_offscreen, gpu::kNullSurfaceHandle, |
49 shared_context, attribs, gpu::SharedMemoryLimits(), | 49 shared_context, attribs, gpu::SharedMemoryLimits(), |
50 gpu_memory_buffer_manager, image_factory, std::move(task_runner))); | 50 gpu_memory_buffer_manager, image_factory, std::move(task_runner))); |
51 | 51 |
52 DCHECK(context); | 52 DCHECK(context); |
53 return context; | 53 return context; |
54 } | 54 } |
55 | 55 |
56 std::unique_ptr<gpu::GLInProcessContext> CreateTestInProcessContext() { | 56 std::unique_ptr<gpu::GLInProcessContext> CreateTestInProcessContext() { |
57 return CreateTestInProcessContext(nullptr, nullptr, nullptr, | 57 return CreateTestInProcessContext(nullptr, nullptr, nullptr, |
58 base::ThreadTaskRunnerHandle::Get()); | 58 base::ThreadTaskRunnerHandle::Get()); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 capabilities.texture_format_bgra8888 = true; | 117 capabilities.texture_format_bgra8888 = true; |
118 break; | 118 break; |
119 } | 119 } |
120 return capabilities; | 120 return capabilities; |
121 } | 121 } |
122 | 122 |
123 void TestInProcessContextProvider::SetLostContextCallback( | 123 void TestInProcessContextProvider::SetLostContextCallback( |
124 const LostContextCallback& lost_context_callback) {} | 124 const LostContextCallback& lost_context_callback) {} |
125 | 125 |
126 } // namespace cc | 126 } // namespace cc |
OLD | NEW |