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 <stdio.h> | 5 #include <stdio.h> |
6 #include <cmath> | 6 #include <cmath> |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "gpu/command_buffer/client/gl_in_process_context.h" | 10 #include "gpu/command_buffer/client/gl_in_process_context.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 attributes.sample_buffers = 1; | 28 attributes.sample_buffers = 1; |
29 attributes.bind_generates_resource = false; | 29 attributes.bind_generates_resource = false; |
30 | 30 |
31 context_.reset(gpu::GLInProcessContext::Create( | 31 context_.reset(gpu::GLInProcessContext::Create( |
32 nullptr, /* service */ | 32 nullptr, /* service */ |
33 nullptr, /* surface */ | 33 nullptr, /* surface */ |
34 true, /* offscreen */ | 34 true, /* offscreen */ |
35 gfx::kNullAcceleratedWidget, /* window */ | 35 gfx::kNullAcceleratedWidget, /* window */ |
36 gfx::Size(1, 1), /* size */ | 36 gfx::Size(1, 1), /* size */ |
37 nullptr, /* share_context */ | 37 nullptr, /* share_context */ |
38 true, /* use_global_share_group */ | |
39 attributes, gfx::PreferDiscreteGpu, | 38 attributes, gfx::PreferDiscreteGpu, |
40 ::gpu::GLInProcessContextSharedMemoryLimits(), | 39 ::gpu::GLInProcessContextSharedMemoryLimits(), |
41 nullptr, /* gpu_memory_buffer_manager */ | 40 nullptr, /* gpu_memory_buffer_manager */ |
42 nullptr /* image_factory */)); | 41 nullptr /* image_factory */)); |
43 gl_ = context_->GetImplementation(); | 42 gl_ = context_->GetImplementation(); |
44 context_support_ = context_->GetImplementation(); | 43 context_support_ = context_->GetImplementation(); |
45 } | 44 } |
46 | 45 |
47 void TearDown() override { context_.reset(NULL); } | 46 void TearDown() override { context_.reset(NULL); } |
48 | 47 |
49 protected: | 48 protected: |
50 gpu::gles2::GLES2Interface* gl_; | 49 gpu::gles2::GLES2Interface* gl_; |
51 gpu::ContextSupport* context_support_; | 50 gpu::ContextSupport* context_support_; |
52 | 51 |
53 private: | 52 private: |
54 scoped_ptr<gpu::GLInProcessContext> context_; | 53 scoped_ptr<gpu::GLInProcessContext> context_; |
55 }; | 54 }; |
56 | 55 |
57 } // namespace | 56 } // namespace |
58 | 57 |
59 // Include the actual tests. | 58 // Include the actual tests. |
60 #define CONTEXT_TEST_F TEST_F | 59 #define CONTEXT_TEST_F TEST_F |
61 #include "content/common/gpu/client/gpu_context_tests.h" | 60 #include "content/common/gpu/client/gpu_context_tests.h" |
OLD | NEW |