| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "gpu/command_buffer/tests/gl_manager.h" | 5 #include "gpu/command_buffer/tests/gl_manager.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 std::vector<int32> attribs; | 110 std::vector<int32> attribs; |
| 111 gles2::ContextCreationAttribHelper attrib_helper; | 111 gles2::ContextCreationAttribHelper attrib_helper; |
| 112 attrib_helper.red_size_ = 8; | 112 attrib_helper.red_size_ = 8; |
| 113 attrib_helper.green_size_ = 8; | 113 attrib_helper.green_size_ = 8; |
| 114 attrib_helper.blue_size_ = 8; | 114 attrib_helper.blue_size_ = 8; |
| 115 attrib_helper.alpha_size_ = 8; | 115 attrib_helper.alpha_size_ = 8; |
| 116 attrib_helper.depth_size_ = 16; | 116 attrib_helper.depth_size_ = 16; |
| 117 attrib_helper.Serialize(&attribs); | 117 attrib_helper.Serialize(&attribs); |
| 118 | 118 |
| 119 if (!context_group) { | 119 if (!context_group) { |
| 120 context_group = new gles2::ContextGroup(mailbox_manager_.get(), | 120 context_group = |
| 121 options.image_manager, | 121 new gles2::ContextGroup(mailbox_manager_.get(), |
| 122 NULL, | 122 options.image_manager, |
| 123 NULL, | 123 NULL, |
| 124 options.bind_generates_resource); | 124 new gpu::gles2::ShaderTranslatorCache, |
| 125 NULL, |
| 126 options.bind_generates_resource); |
| 125 } | 127 } |
| 126 | 128 |
| 127 decoder_.reset(::gpu::gles2::GLES2Decoder::Create(context_group)); | 129 decoder_.reset(::gpu::gles2::GLES2Decoder::Create(context_group)); |
| 128 | 130 |
| 129 command_buffer_.reset(new CommandBufferService( | 131 command_buffer_.reset(new CommandBufferService( |
| 130 decoder_->GetContextGroup()->transfer_buffer_manager())); | 132 decoder_->GetContextGroup()->transfer_buffer_manager())); |
| 131 ASSERT_TRUE(command_buffer_->Initialize()) | 133 ASSERT_TRUE(command_buffer_->Initialize()) |
| 132 << "could not create command buffer service"; | 134 << "could not create command buffer service"; |
| 133 | 135 |
| 134 gpu_scheduler_.reset(new GpuScheduler(command_buffer_.get(), | 136 gpu_scheduler_.reset(new GpuScheduler(command_buffer_.get(), |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 if (!context_lost_allowed_) { | 263 if (!context_lost_allowed_) { |
| 262 ASSERT_EQ(::gpu::error::kNoError, state.error); | 264 ASSERT_EQ(::gpu::error::kNoError, state.error); |
| 263 } | 265 } |
| 264 } | 266 } |
| 265 | 267 |
| 266 bool GLManager::GetBufferChanged(int32 transfer_buffer_id) { | 268 bool GLManager::GetBufferChanged(int32 transfer_buffer_id) { |
| 267 return gpu_scheduler_->SetGetBuffer(transfer_buffer_id); | 269 return gpu_scheduler_->SetGetBuffer(transfer_buffer_id); |
| 268 } | 270 } |
| 269 | 271 |
| 270 } // namespace gpu | 272 } // namespace gpu |
| OLD | NEW |