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

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

Issue 1417363006: ui: Add support for creating GLImage instances from shared memory pools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@usage-rename
Patch Set: static_cast<off_t> to make windows build happy Created 5 years, 2 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
« no previous file with comments | « content/common/gpu/gpu_channel.cc ('k') | ui/gfx/gpu_memory_buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/in_process_command_buffer.cc
diff --git a/gpu/command_buffer/service/in_process_command_buffer.cc b/gpu/command_buffer/service/in_process_command_buffer.cc
index 5493054fd8130aaa81cdcaf6d4436085503d94a9..77647efad256f9b37c572b320432098cc95e638f 100644
--- a/gpu/command_buffer/service/in_process_command_buffer.cc
+++ b/gpu/command_buffer/service/in_process_command_buffer.cc
@@ -98,6 +98,7 @@ gfx::GpuMemoryBufferHandle ShareGpuMemoryBufferToGpuThread(
gfx::GpuMemoryBufferHandle handle;
handle.type = gfx::SHARED_MEMORY_BUFFER;
handle.handle = ShareToGpuThread(source_handle.handle);
+ handle.offset = source_handle.offset;
*requires_sync_point = false;
return handle;
}
@@ -713,7 +714,7 @@ void InProcessCommandBuffer::CreateImageOnGpuThread(
case gfx::SHARED_MEMORY_BUFFER: {
scoped_refptr<gfx::GLImageSharedMemory> image(
new gfx::GLImageSharedMemory(size, internalformat));
- if (!image->Initialize(handle.handle, handle.id, format)) {
+ if (!image->Initialize(handle.handle, handle.id, format, handle.offset)) {
LOG(ERROR) << "Failed to initialize image.";
return;
}
« no previous file with comments | « content/common/gpu/gpu_channel.cc ('k') | ui/gfx/gpu_memory_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698