| 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 #include "base/at_exit.h" | 6 #include "base/at_exit.h" |
| 7 #include "base/bind.h" | 7 #include "base/bind.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/gles2_implementation.h" | 9 #include "gpu/command_buffer/client/gles2_implementation.h" |
| 10 #include "gpu/command_buffer/client/transfer_buffer.h" | 10 #include "gpu/command_buffer/client/transfer_buffer.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 attribs.push_back(EGL_DEPTH_SIZE); | 53 attribs.push_back(EGL_DEPTH_SIZE); |
| 54 attribs.push_back(16); | 54 attribs.push_back(16); |
| 55 attribs.push_back(EGL_NONE); | 55 attribs.push_back(EGL_NONE); |
| 56 | 56 |
| 57 share_group_ = new gfx::GLShareGroup; | 57 share_group_ = new gfx::GLShareGroup; |
| 58 command_buffer_.reset(new CommandBufferService); | 58 command_buffer_.reset(new CommandBufferService); |
| 59 ASSERT_TRUE(command_buffer_->Initialize()) | 59 ASSERT_TRUE(command_buffer_->Initialize()) |
| 60 << "could not create command buffer service"; | 60 << "could not create command buffer service"; |
| 61 | 61 |
| 62 decoder_.reset(::gpu::gles2::GLES2Decoder::Create( | 62 decoder_.reset(::gpu::gles2::GLES2Decoder::Create( |
| 63 new gles2::ContextGroup(false))); | 63 new gles2::ContextGroup(NULL, false))); |
| 64 | 64 |
| 65 gpu_scheduler_.reset(new GpuScheduler(command_buffer_.get(), | 65 gpu_scheduler_.reset(new GpuScheduler(command_buffer_.get(), |
| 66 decoder_.get(), | 66 decoder_.get(), |
| 67 decoder_.get())); | 67 decoder_.get())); |
| 68 | 68 |
| 69 decoder_->set_engine(gpu_scheduler_.get()); | 69 decoder_->set_engine(gpu_scheduler_.get()); |
| 70 | 70 |
| 71 surface_ = gfx::GLSurface::CreateOffscreenGLSurface(false, size); | 71 surface_ = gfx::GLSurface::CreateOffscreenGLSurface(false, size); |
| 72 ASSERT_TRUE(surface_.get() != NULL) << "could not create offscreen surface"; | 72 ASSERT_TRUE(surface_.get() != NULL) << "could not create offscreen surface"; |
| 73 | 73 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 ::gpu::CommandBuffer::State state = command_buffer_->GetState(); | 135 ::gpu::CommandBuffer::State state = command_buffer_->GetState(); |
| 136 ASSERT_EQ(::gpu::error::kNoError, state.error); | 136 ASSERT_EQ(::gpu::error::kNoError, state.error); |
| 137 } | 137 } |
| 138 | 138 |
| 139 bool GLManager::GetBufferChanged(int32 transfer_buffer_id) { | 139 bool GLManager::GetBufferChanged(int32 transfer_buffer_id) { |
| 140 return gpu_scheduler_->SetGetBuffer(transfer_buffer_id); | 140 return gpu_scheduler_->SetGetBuffer(transfer_buffer_id); |
| 141 } | 141 } |
| 142 | 142 |
| 143 } // namespace gpu | 143 } // namespace gpu |
| 144 | 144 |
| OLD | NEW |