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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 } | 269 } |
270 | 270 |
271 Capabilities GLManager::GetCapabilities() { | 271 Capabilities GLManager::GetCapabilities() { |
272 return decoder_->GetCapabilities(); | 272 return decoder_->GetCapabilities(); |
273 } | 273 } |
274 | 274 |
275 gfx::GpuMemoryBuffer* GLManager::CreateGpuMemoryBuffer( | 275 gfx::GpuMemoryBuffer* GLManager::CreateGpuMemoryBuffer( |
276 size_t width, | 276 size_t width, |
277 size_t height, | 277 size_t height, |
278 unsigned internalformat, | 278 unsigned internalformat, |
| 279 unsigned usage, |
279 int32* id) { | 280 int32* id) { |
280 *id = -1; | 281 *id = -1; |
281 scoped_ptr<gfx::GpuMemoryBuffer> buffer( | 282 scoped_ptr<gfx::GpuMemoryBuffer> buffer( |
282 gpu_memory_buffer_factory_->CreateGpuMemoryBuffer( | 283 gpu_memory_buffer_factory_->CreateGpuMemoryBuffer( |
283 width, height, internalformat)); | 284 width, height, internalformat, usage)); |
284 if (!buffer.get()) | 285 if (!buffer.get()) |
285 return NULL; | 286 return NULL; |
286 | 287 |
287 static int32 next_id = 1; | 288 static int32 next_id = 1; |
288 *id = next_id++; | 289 *id = next_id++; |
289 gpu_control_service_->RegisterGpuMemoryBuffer( | 290 gpu_control_service_->RegisterGpuMemoryBuffer( |
290 *id, buffer->GetHandle(), width, height, internalformat); | 291 *id, buffer->GetHandle(), width, height, internalformat); |
291 gfx::GpuMemoryBuffer* raw_buffer = buffer.get(); | 292 gfx::GpuMemoryBuffer* raw_buffer = buffer.get(); |
292 memory_buffers_.add(*id, buffer.Pass()); | 293 memory_buffers_.add(*id, buffer.Pass()); |
293 return raw_buffer; | 294 return raw_buffer; |
(...skipping 29 matching lines...) Expand all Loading... |
323 void GLManager::Echo(const base::Closure& callback) { | 324 void GLManager::Echo(const base::Closure& callback) { |
324 NOTIMPLEMENTED(); | 325 NOTIMPLEMENTED(); |
325 } | 326 } |
326 | 327 |
327 uint32 GLManager::CreateStreamTexture(uint32 texture_id) { | 328 uint32 GLManager::CreateStreamTexture(uint32 texture_id) { |
328 NOTIMPLEMENTED(); | 329 NOTIMPLEMENTED(); |
329 return 0; | 330 return 0; |
330 } | 331 } |
331 | 332 |
332 } // namespace gpu | 333 } // namespace gpu |
OLD | NEW |