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 24 matching lines...) Expand all Loading... |
35 attribs.alpha_size = 8; | 35 attribs.alpha_size = 8; |
36 attribs.blue_size = 8; | 36 attribs.blue_size = 8; |
37 attribs.green_size = 8; | 37 attribs.green_size = 8; |
38 attribs.red_size = 8; | 38 attribs.red_size = 8; |
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 gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu; | 45 gl::GpuPreference gpu_preference = gl::PreferDiscreteGpu; |
46 | 46 |
47 std::unique_ptr<gpu::GLInProcessContext> context = | 47 std::unique_ptr<gpu::GLInProcessContext> context = |
48 base::WrapUnique(gpu::GLInProcessContext::Create( | 48 base::WrapUnique(gpu::GLInProcessContext::Create( |
49 nullptr, nullptr, is_offscreen, gfx::kNullAcceleratedWidget, | 49 nullptr, nullptr, is_offscreen, gfx::kNullAcceleratedWidget, |
50 gfx::Size(1, 1), shared_context, attribs, gpu_preference, | 50 gfx::Size(1, 1), shared_context, attribs, gpu_preference, |
51 gpu::SharedMemoryLimits(), gpu_memory_buffer_manager, image_factory)); | 51 gpu::SharedMemoryLimits(), gpu_memory_buffer_manager, image_factory)); |
52 | 52 |
53 DCHECK(context); | 53 DCHECK(context); |
54 return context; | 54 return context; |
55 } | 55 } |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 | 115 |
116 void TestInProcessContextProvider::DeleteCachedResources() { | 116 void TestInProcessContextProvider::DeleteCachedResources() { |
117 if (gr_context_) | 117 if (gr_context_) |
118 gr_context_->FreeGpuResources(); | 118 gr_context_->FreeGpuResources(); |
119 } | 119 } |
120 | 120 |
121 void TestInProcessContextProvider::SetLostContextCallback( | 121 void TestInProcessContextProvider::SetLostContextCallback( |
122 const LostContextCallback& lost_context_callback) {} | 122 const LostContextCallback& lost_context_callback) {} |
123 | 123 |
124 } // namespace cc | 124 } // namespace cc |
OLD | NEW |