| 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 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 namespace cc { | 26 namespace cc { |
| 27 | 27 |
| 28 // static | 28 // static |
| 29 std::unique_ptr<gpu::GLInProcessContext> CreateTestInProcessContext( | 29 std::unique_ptr<gpu::GLInProcessContext> CreateTestInProcessContext( |
| 30 TestGpuMemoryBufferManager* gpu_memory_buffer_manager, | 30 TestGpuMemoryBufferManager* gpu_memory_buffer_manager, |
| 31 TestImageFactory* image_factory, | 31 TestImageFactory* image_factory, |
| 32 gpu::GLInProcessContext* shared_context) { | 32 gpu::GLInProcessContext* shared_context) { |
| 33 const bool is_offscreen = true; | 33 const bool is_offscreen = true; |
| 34 gpu::gles2::ContextCreationAttribHelper attribs; | 34 gpu::gles2::ContextCreationAttribHelper attribs; |
| 35 attribs.alpha_size = 8; | 35 attribs.alpha_size = -1; |
| 36 attribs.blue_size = 8; | |
| 37 attribs.green_size = 8; | |
| 38 attribs.red_size = 8; | |
| 39 attribs.depth_size = 24; | 36 attribs.depth_size = 24; |
| 40 attribs.stencil_size = 8; | 37 attribs.stencil_size = 8; |
| 41 attribs.samples = 0; | 38 attribs.samples = 0; |
| 42 attribs.sample_buffers = 0; | 39 attribs.sample_buffers = 0; |
| 43 attribs.fail_if_major_perf_caveat = false; | 40 attribs.fail_if_major_perf_caveat = false; |
| 44 attribs.bind_generates_resource = false; | 41 attribs.bind_generates_resource = false; |
| 45 gl::GpuPreference gpu_preference = gl::PreferDiscreteGpu; | 42 gl::GpuPreference gpu_preference = gl::PreferDiscreteGpu; |
| 46 | 43 |
| 47 std::unique_ptr<gpu::GLInProcessContext> context = | 44 std::unique_ptr<gpu::GLInProcessContext> context = |
| 48 base::WrapUnique(gpu::GLInProcessContext::Create( | 45 base::WrapUnique(gpu::GLInProcessContext::Create( |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 | 112 |
| 116 void TestInProcessContextProvider::DeleteCachedResources() { | 113 void TestInProcessContextProvider::DeleteCachedResources() { |
| 117 if (gr_context_) | 114 if (gr_context_) |
| 118 gr_context_->FreeGpuResources(); | 115 gr_context_->FreeGpuResources(); |
| 119 } | 116 } |
| 120 | 117 |
| 121 void TestInProcessContextProvider::SetLostContextCallback( | 118 void TestInProcessContextProvider::SetLostContextCallback( |
| 122 const LostContextCallback& lost_context_callback) {} | 119 const LostContextCallback& lost_context_callback) {} |
| 123 | 120 |
| 124 } // namespace cc | 121 } // namespace cc |
| OLD | NEW |