| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 #include <cmath> | 9 #include <cmath> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 attributes.alpha_size = 8; | 60 attributes.alpha_size = 8; |
| 61 attributes.depth_size = 24; | 61 attributes.depth_size = 24; |
| 62 attributes.red_size = 8; | 62 attributes.red_size = 8; |
| 63 attributes.green_size = 8; | 63 attributes.green_size = 8; |
| 64 attributes.blue_size = 8; | 64 attributes.blue_size = 8; |
| 65 attributes.stencil_size = 8; | 65 attributes.stencil_size = 8; |
| 66 attributes.samples = 4; | 66 attributes.samples = 4; |
| 67 attributes.sample_buffers = 1; | 67 attributes.sample_buffers = 1; |
| 68 attributes.bind_generates_resource = false; | 68 attributes.bind_generates_resource = false; |
| 69 | 69 |
| 70 context_.reset(gpu::GLInProcessContext::Create( | 70 context_.reset( |
| 71 nullptr, /* service */ | 71 gpu::GLInProcessContext::Create(nullptr, /* service */ |
| 72 nullptr, /* surface */ | 72 nullptr, /* surface */ |
| 73 true, /* offscreen */ | 73 true, /* offscreen */ |
| 74 gfx::kNullAcceleratedWidget, /* window */ | 74 gpu::kNullSurfaceHandle, /* window */ |
| 75 nullptr, /* share_context */ | 75 nullptr, /* share_context */ |
| 76 attributes, gpu::SharedMemoryLimits(), | 76 attributes, gpu::SharedMemoryLimits(), |
| 77 nullptr, /* gpu_memory_buffer_manager */ | 77 nullptr, /* gpu_memory_buffer_manager */ |
| 78 nullptr, /* image_factory */ | 78 nullptr, /* image_factory */ |
| 79 base::ThreadTaskRunnerHandle::Get())); | 79 base::ThreadTaskRunnerHandle::Get())); |
| 80 gl_ = context_->GetImplementation(); | 80 gl_ = context_->GetImplementation(); |
| 81 gpu::ContextSupport* support = context_->GetImplementation(); | 81 gpu::ContextSupport* support = context_->GetImplementation(); |
| 82 | 82 |
| 83 helper_.reset(new display_compositor::GLHelper(gl_, support)); | 83 helper_.reset(new display_compositor::GLHelper(gl_, support)); |
| 84 helper_scaling_.reset( | 84 helper_scaling_.reset( |
| 85 new display_compositor::GLHelperScaling(gl_, helper_.get())); | 85 new display_compositor::GLHelperScaling(gl_, helper_.get())); |
| 86 } | 86 } |
| 87 | 87 |
| 88 void TearDown() override { | 88 void TearDown() override { |
| 89 helper_scaling_.reset(nullptr); | 89 helper_scaling_.reset(nullptr); |
| (...skipping 1338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1428 } | 1428 } |
| 1429 } | 1429 } |
| 1430 } | 1430 } |
| 1431 | 1431 |
| 1432 TEST_F(GLHelperTest, CheckOptimizations) { | 1432 TEST_F(GLHelperTest, CheckOptimizations) { |
| 1433 // Test in baseclass since it is friends with GLHelperScaling | 1433 // Test in baseclass since it is friends with GLHelperScaling |
| 1434 CheckOptimizationsTest(); | 1434 CheckOptimizationsTest(); |
| 1435 } | 1435 } |
| 1436 | 1436 |
| 1437 } // namespace display_compositor | 1437 } // namespace display_compositor |
| OLD | NEW |