Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Side by Side Diff: gpu/command_buffer/tests/gl_manager.cc

Issue 205193006: gpu: Remove map_image field from gpu::Capabilities. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move TODO Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 context_.get(), 166 context_.get(),
167 true, 167 true,
168 options.size, 168 options.size,
169 ::gpu::gles2::DisallowedFeatures(), 169 ::gpu::gles2::DisallowedFeatures(),
170 attribs)) << "could not initialize decoder"; 170 attribs)) << "could not initialize decoder";
171 171
172 gpu_control_.reset( 172 gpu_control_.reset(
173 new GpuControlService(decoder_->GetContextGroup()->image_manager(), 173 new GpuControlService(decoder_->GetContextGroup()->image_manager(),
174 options.gpu_memory_buffer_factory, 174 options.gpu_memory_buffer_factory,
175 decoder_->GetContextGroup()->mailbox_manager(), 175 decoder_->GetContextGroup()->mailbox_manager(),
176 decoder_->GetQueryManager(), 176 decoder_->GetQueryManager()));
177 decoder_->GetCapabilities()));
178 177
179 command_buffer_->SetPutOffsetChangeCallback( 178 command_buffer_->SetPutOffsetChangeCallback(
180 base::Bind(&GLManager::PumpCommands, base::Unretained(this))); 179 base::Bind(&GLManager::PumpCommands, base::Unretained(this)));
181 command_buffer_->SetGetBufferChangeCallback( 180 command_buffer_->SetGetBufferChangeCallback(
182 base::Bind(&GLManager::GetBufferChanged, base::Unretained(this))); 181 base::Bind(&GLManager::GetBufferChanged, base::Unretained(this)));
183 182
184 // Create the GLES2 helper, which writes the command buffer protocol. 183 // Create the GLES2 helper, which writes the command buffer protocol.
185 gles2_helper_.reset(new gles2::GLES2CmdHelper(command_buffer_.get())); 184 gles2_helper_.reset(new gles2::GLES2CmdHelper(command_buffer_.get()));
186 ASSERT_TRUE(gles2_helper_->Initialize(kCommandBufferSize)); 185 ASSERT_TRUE(gles2_helper_->Initialize(kCommandBufferSize));
187 186
188 // Create a transfer buffer. 187 // Create a transfer buffer.
189 transfer_buffer_.reset(new TransferBuffer(gles2_helper_.get())); 188 transfer_buffer_.reset(new TransferBuffer(gles2_helper_.get()));
190 189
191 // Create the object exposing the OpenGL API. 190 // Create the object exposing the OpenGL API.
192 gles2_implementation_.reset(new gles2::GLES2Implementation( 191 gles2_implementation_.reset(new gles2::GLES2Implementation(
193 gles2_helper_.get(), 192 gles2_helper_.get(),
194 client_share_group, 193 client_share_group,
195 transfer_buffer_.get(), 194 transfer_buffer_.get(),
196 options.bind_generates_resource, 195 options.bind_generates_resource,
197 gpu_control_.get())); 196 gpu_control_.get(),
197 decoder_->GetCapabilities()));
198 198
199 ASSERT_TRUE(gles2_implementation_->Initialize( 199 ASSERT_TRUE(gles2_implementation_->Initialize(
200 kStartTransferBufferSize, 200 kStartTransferBufferSize,
201 kMinTransferBufferSize, 201 kMinTransferBufferSize,
202 kMaxTransferBufferSize, 202 kMaxTransferBufferSize,
203 gpu::gles2::GLES2Implementation::kNoLimit)) 203 gpu::gles2::GLES2Implementation::kNoLimit))
204 << "Could not init GLES2Implementation"; 204 << "Could not init GLES2Implementation";
205 205
206 MakeCurrent(); 206 MakeCurrent();
207 } 207 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 if (!context_lost_allowed_) { 260 if (!context_lost_allowed_) {
261 ASSERT_EQ(::gpu::error::kNoError, state.error); 261 ASSERT_EQ(::gpu::error::kNoError, state.error);
262 } 262 }
263 } 263 }
264 264
265 bool GLManager::GetBufferChanged(int32 transfer_buffer_id) { 265 bool GLManager::GetBufferChanged(int32 transfer_buffer_id) {
266 return gpu_scheduler_->SetGetBuffer(transfer_buffer_id); 266 return gpu_scheduler_->SetGetBuffer(transfer_buffer_id);
267 } 267 }
268 268
269 } // namespace gpu 269 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/in_process_command_buffer.cc ('k') | gpu/gles2_conform_support/egl/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698