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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 ASSERT_TRUE(surface_.get() != NULL) << "could not create offscreen surface"; | 72 ASSERT_TRUE(surface_.get() != NULL) << "could not create offscreen surface"; |
73 | 73 |
74 context_ = gfx::GLContext::CreateGLContext(share_group_.get(), | 74 context_ = gfx::GLContext::CreateGLContext(share_group_.get(), |
75 surface_.get(), | 75 surface_.get(), |
76 gpu_preference); | 76 gpu_preference); |
77 ASSERT_TRUE(context_.get() != NULL) << "could not create GL context"; | 77 ASSERT_TRUE(context_.get() != NULL) << "could not create GL context"; |
78 | 78 |
79 ASSERT_TRUE(decoder_->Initialize( | 79 ASSERT_TRUE(decoder_->Initialize( |
80 surface_.get(), | 80 surface_.get(), |
81 context_.get(), | 81 context_.get(), |
| 82 true, |
82 size, | 83 size, |
83 ::gpu::gles2::DisallowedFeatures(), | 84 ::gpu::gles2::DisallowedFeatures(), |
84 allowed_extensions, | 85 allowed_extensions, |
85 attribs)) << "could not initialize decoder"; | 86 attribs)) << "could not initialize decoder"; |
86 | 87 |
87 command_buffer_->SetPutOffsetChangeCallback( | 88 command_buffer_->SetPutOffsetChangeCallback( |
88 base::Bind(&GLManager::PumpCommands, base::Unretained(this))); | 89 base::Bind(&GLManager::PumpCommands, base::Unretained(this))); |
89 command_buffer_->SetGetBufferChangeCallback( | 90 command_buffer_->SetGetBufferChangeCallback( |
90 base::Bind(&GLManager::GetBufferChanged, base::Unretained(this))); | 91 base::Bind(&GLManager::GetBufferChanged, base::Unretained(this))); |
91 | 92 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 ::gpu::CommandBuffer::State state = command_buffer_->GetState(); | 136 ::gpu::CommandBuffer::State state = command_buffer_->GetState(); |
136 ASSERT_EQ(::gpu::error::kNoError, state.error); | 137 ASSERT_EQ(::gpu::error::kNoError, state.error); |
137 } | 138 } |
138 | 139 |
139 bool GLManager::GetBufferChanged(int32 transfer_buffer_id) { | 140 bool GLManager::GetBufferChanged(int32 transfer_buffer_id) { |
140 return gpu_scheduler_->SetGetBuffer(transfer_buffer_id); | 141 return gpu_scheduler_->SetGetBuffer(transfer_buffer_id); |
141 } | 142 } |
142 | 143 |
143 } // namespace gpu | 144 } // namespace gpu |
144 | 145 |
OLD | NEW |