| 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 "base/at_exit.h" | 5 #include "base/at_exit.h" |
| 6 #include "base/bind.h" | 6 #include "base/bind.h" |
| 7 #include "gpu/command_buffer/client/gles2_implementation.h" | 7 #include "gpu/command_buffer/client/gles2_implementation.h" |
| 8 #include "gpu/command_buffer/client/gles2_lib.h" | 8 #include "gpu/command_buffer/client/gles2_lib.h" |
| 9 #include "gpu/command_buffer/client/transfer_buffer.h" | 9 #include "gpu/command_buffer/client/transfer_buffer.h" |
| 10 #include "gpu/command_buffer/common/constants.h" | 10 #include "gpu/command_buffer/common/constants.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 attribs.push_back(EGL_BLUE_SIZE); | 88 attribs.push_back(EGL_BLUE_SIZE); |
| 89 attribs.push_back(8); | 89 attribs.push_back(8); |
| 90 attribs.push_back(EGL_ALPHA_SIZE); | 90 attribs.push_back(EGL_ALPHA_SIZE); |
| 91 attribs.push_back(8); | 91 attribs.push_back(8); |
| 92 attribs.push_back(EGL_DEPTH_SIZE); | 92 attribs.push_back(EGL_DEPTH_SIZE); |
| 93 attribs.push_back(16); | 93 attribs.push_back(16); |
| 94 attribs.push_back(EGL_NONE); | 94 attribs.push_back(EGL_NONE); |
| 95 | 95 |
| 96 if (!context_group) { | 96 if (!context_group) { |
| 97 context_group = new gles2::ContextGroup( | 97 context_group = new gles2::ContextGroup( |
| 98 mailbox_manager_.get(), kBindGeneratesResource); | 98 mailbox_manager_.get(), |
| 99 kBindGeneratesResource, |
| 100 NULL); |
| 99 } | 101 } |
| 100 | 102 |
| 101 decoder_.reset(::gpu::gles2::GLES2Decoder::Create(context_group)); | 103 decoder_.reset(::gpu::gles2::GLES2Decoder::Create(context_group)); |
| 102 | 104 |
| 103 command_buffer_.reset(new CommandBufferService( | 105 command_buffer_.reset(new CommandBufferService( |
| 104 decoder_->GetContextGroup()->transfer_buffer_manager())); | 106 decoder_->GetContextGroup()->transfer_buffer_manager())); |
| 105 ASSERT_TRUE(command_buffer_->Initialize()) | 107 ASSERT_TRUE(command_buffer_->Initialize()) |
| 106 << "could not create command buffer service"; | 108 << "could not create command buffer service"; |
| 107 | 109 |
| 108 gpu_scheduler_.reset(new GpuScheduler(command_buffer_.get(), | 110 gpu_scheduler_.reset(new GpuScheduler(command_buffer_.get(), |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 ::gpu::CommandBuffer::State state = command_buffer_->GetState(); | 186 ::gpu::CommandBuffer::State state = command_buffer_->GetState(); |
| 185 ASSERT_EQ(::gpu::error::kNoError, state.error); | 187 ASSERT_EQ(::gpu::error::kNoError, state.error); |
| 186 } | 188 } |
| 187 | 189 |
| 188 bool GLManager::GetBufferChanged(int32 transfer_buffer_id) { | 190 bool GLManager::GetBufferChanged(int32 transfer_buffer_id) { |
| 189 return gpu_scheduler_->SetGetBuffer(transfer_buffer_id); | 191 return gpu_scheduler_->SetGetBuffer(transfer_buffer_id); |
| 190 } | 192 } |
| 191 | 193 |
| 192 } // namespace gpu | 194 } // namespace gpu |
| 193 | 195 |
| OLD | NEW |