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

Unified Diff: ui/gl/gl_image_shared_memory.cc

Issue 1354483004: Re-land: ui: Add GLImage unit test framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 | « ui/gl/gl_image_shared_memory.h ('k') | ui/gl/gl_image_shared_memory_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_image_shared_memory.cc
diff --git a/ui/gl/gl_image_shared_memory.cc b/ui/gl/gl_image_shared_memory.cc
index 33ba4d161aba82b7f95f085e27f75c20e5d26f0f..16ec6cba4a29b5bdb958fe8e0dbadc5c3614440d 100644
--- a/ui/gl/gl_image_shared_memory.cc
+++ b/ui/gl/gl_image_shared_memory.cc
@@ -40,16 +40,18 @@ GLImageSharedMemory::~GLImageSharedMemory() {
DCHECK(!shared_memory_);
}
-bool GLImageSharedMemory::Initialize(const gfx::GpuMemoryBufferHandle& handle,
- gfx::BufferFormat format) {
+bool GLImageSharedMemory::Initialize(
+ const base::SharedMemoryHandle& handle,
+ gfx::GenericSharedMemoryId shared_memory_id,
+ gfx::BufferFormat format) {
size_t size_in_bytes;
if (!SizeInBytes(GetSize(), format, &size_in_bytes))
return false;
- if (!base::SharedMemory::IsHandleValid(handle.handle))
+ if (!base::SharedMemory::IsHandleValid(handle))
return false;
- base::SharedMemory shared_memory(handle.handle, true);
+ base::SharedMemory shared_memory(handle, true);
// Duplicate the handle.
base::SharedMemoryHandle duped_shared_memory_handle;
@@ -73,7 +75,7 @@ bool GLImageSharedMemory::Initialize(const gfx::GpuMemoryBufferHandle& handle,
DCHECK(!shared_memory_);
shared_memory_ = duped_shared_memory.Pass();
- shared_memory_id_ = handle.id;
+ shared_memory_id_ = shared_memory_id;
return true;
}
« no previous file with comments | « ui/gl/gl_image_shared_memory.h ('k') | ui/gl/gl_image_shared_memory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698