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

Unified Diff: gpu/command_buffer/service/gpu_control_service.cc

Issue 255713008: Change glimage to accept a type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: First draft Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/gpu_control_service.cc
diff --git a/gpu/command_buffer/service/gpu_control_service.cc b/gpu/command_buffer/service/gpu_control_service.cc
index 893b872c0c7cab8c6438cb458fd7081d5516a982..deb6295abf804a21a96b590240f2a9cb4cd4e96c 100644
--- a/gpu/command_buffer/service/gpu_control_service.cc
+++ b/gpu/command_buffer/service/gpu_control_service.cc
@@ -37,25 +37,22 @@ gfx::GpuMemoryBuffer* GpuControlService::CreateGpuMemoryBuffer(
size_t width,
size_t height,
unsigned internalformat,
+ gfx::GpuMemoryBuffer::Usage usage,
int32* id) {
*id = -1;
CHECK(gpu_memory_buffer_factory_) << "No GPU memory buffer factory provided";
- linked_ptr<gfx::GpuMemoryBuffer> buffer = make_linked_ptr(
- gpu_memory_buffer_factory_->CreateGpuMemoryBuffer(width,
- height,
- internalformat));
+ linked_ptr<gfx::GpuMemoryBuffer> buffer =
+ make_linked_ptr(gpu_memory_buffer_factory_->CreateGpuMemoryBuffer(
+ width, height, internalformat, usage));
if (!buffer.get())
return NULL;
static int32 next_id = 1;
*id = next_id++;
- if (!RegisterGpuMemoryBuffer(*id,
- buffer->GetHandle(),
- width,
- height,
- internalformat)) {
+ if (!RegisterGpuMemoryBuffer(
+ *id, buffer->GetHandle(), width, height, internalformat, usage)) {
*id = -1;
return NULL;
}
@@ -115,12 +112,10 @@ bool GpuControlService::RegisterGpuMemoryBuffer(
gfx::GpuMemoryBufferHandle buffer,
size_t width,
size_t height,
- unsigned internalformat) {
- return gpu_memory_buffer_manager_->RegisterGpuMemoryBuffer(id,
- buffer,
- width,
- height,
- internalformat);
+ unsigned internalformat,
+ unsigned usage) {
+ return gpu_memory_buffer_manager_->RegisterGpuMemoryBuffer(
+ id, buffer, width, height, internalformat, usage);
}
} // namespace gpu

Powered by Google App Engine
This is Rietveld 408576698