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" |
11 #include "gpu/command_buffer/client/gles2_lib.h" | 11 #include "gpu/command_buffer/client/gles2_lib.h" |
| 12 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
12 #include "gpu/skia_bindings/gl_bindings_skia_cmd_buffer.h" | 13 #include "gpu/skia_bindings/gl_bindings_skia_cmd_buffer.h" |
13 #include "third_party/khronos/GLES2/gl2.h" | 14 #include "third_party/khronos/GLES2/gl2.h" |
14 #include "third_party/khronos/GLES2/gl2ext.h" | 15 #include "third_party/khronos/GLES2/gl2ext.h" |
15 #include "third_party/skia/include/gpu/GrContext.h" | 16 #include "third_party/skia/include/gpu/GrContext.h" |
16 #include "third_party/skia/include/gpu/gl/GrGLInterface.h" | 17 #include "third_party/skia/include/gpu/gl/GrGLInterface.h" |
17 #include "ui/gfx/native_widget_types.h" | 18 #include "ui/gfx/native_widget_types.h" |
18 | 19 |
19 namespace cc { | 20 namespace cc { |
20 | 21 |
21 // static | 22 // static |
22 scoped_ptr<gpu::GLInProcessContext> CreateTestInProcessContext() { | 23 scoped_ptr<gpu::GLInProcessContext> CreateTestInProcessContext() { |
23 const bool is_offscreen = true; | 24 const bool is_offscreen = true; |
24 const bool share_resources = true; | 25 const bool share_resources = true; |
25 gpu::GLInProcessContextAttribs attribs; | 26 gpu::gles2::ContextCreationAttribHelper attribs; |
26 attribs.alpha_size = 8; | 27 attribs.alpha_size = 8; |
27 attribs.blue_size = 8; | 28 attribs.blue_size = 8; |
28 attribs.green_size = 8; | 29 attribs.green_size = 8; |
29 attribs.red_size = 8; | 30 attribs.red_size = 8; |
30 attribs.depth_size = 24; | 31 attribs.depth_size = 24; |
31 attribs.stencil_size = 8; | 32 attribs.stencil_size = 8; |
32 attribs.samples = 0; | 33 attribs.samples = 0; |
33 attribs.sample_buffers = 0; | 34 attribs.sample_buffers = 0; |
34 attribs.fail_if_major_perf_caveat = false; | 35 attribs.fail_if_major_perf_caveat = false; |
| 36 attribs.bind_generates_resource = false; |
35 gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu; | 37 gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu; |
36 | 38 |
37 scoped_ptr<gpu::GLInProcessContext> context = make_scoped_ptr( | 39 scoped_ptr<gpu::GLInProcessContext> context = make_scoped_ptr( |
38 gpu::GLInProcessContext::Create(NULL, | 40 gpu::GLInProcessContext::Create(NULL, |
39 NULL, | 41 NULL, |
40 is_offscreen, | 42 is_offscreen, |
41 gfx::kNullAcceleratedWidget, | 43 gfx::kNullAcceleratedWidget, |
42 gfx::Size(1, 1), | 44 gfx::Size(1, 1), |
43 NULL, | 45 NULL, |
44 share_resources, | 46 share_resources, |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 | 128 |
127 bool TestInProcessContextProvider::DestroyedOnMainThread() { return false; } | 129 bool TestInProcessContextProvider::DestroyedOnMainThread() { return false; } |
128 | 130 |
129 void TestInProcessContextProvider::SetLostContextCallback( | 131 void TestInProcessContextProvider::SetLostContextCallback( |
130 const LostContextCallback& lost_context_callback) {} | 132 const LostContextCallback& lost_context_callback) {} |
131 | 133 |
132 void TestInProcessContextProvider::SetMemoryPolicyChangedCallback( | 134 void TestInProcessContextProvider::SetMemoryPolicyChangedCallback( |
133 const MemoryPolicyChangedCallback& memory_policy_changed_callback) {} | 135 const MemoryPolicyChangedCallback& memory_policy_changed_callback) {} |
134 | 136 |
135 } // namespace cc | 137 } // namespace cc |
OLD | NEW |