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

Unified Diff: content/common/gpu/gpu_channel.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
Index: content/common/gpu/gpu_channel.cc
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc
index 88d59ecf413a1a2ab73b536e0a6224b4e994576f..2ef4571f1cbd7a92a1957fc1f50aee7a2373e8db 100644
--- a/content/common/gpu/gpu_channel.cc
+++ b/content/common/gpu/gpu_channel.cc
@@ -1042,15 +1042,15 @@ scoped_refptr<gfx::GLImage> GpuChannel::CreateImageForGpuMemoryBuffer(
case gfx::SHARED_MEMORY_BUFFER: {
scoped_refptr<gfx::GLImageSharedMemory> image(
new gfx::GLImageSharedMemory(size, internalformat));
- if (!image->Initialize(handle.handle, handle.id, format))
- return scoped_refptr<gfx::GLImage>();
+ if (!image->Initialize(handle.handle, handle.id, format, handle.offset))
+ return nullptr;
return image;
}
default: {
GpuChannelManager* manager = gpu_channel_manager();
if (!manager->gpu_memory_buffer_factory())
- return scoped_refptr<gfx::GLImage>();
+ return nullptr;
return manager->gpu_memory_buffer_factory()
->AsImageFactory()

Powered by Google App Engine
This is Rietveld 408576698