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

Unified Diff: ppapi/proxy/ppb_image_data_proxy.cc

Issue 13529027: Switch Linux Auru ports over to POSIX SHM instead of legacy SYSV SHM. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 7 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 | « ppapi/proxy/pdf_resource.cc ('k') | ppapi/proxy/serialized_structs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_image_data_proxy.cc
===================================================================
--- ppapi/proxy/ppb_image_data_proxy.cc (revision 200710)
+++ ppapi/proxy/ppb_image_data_proxy.cc (working copy)
@@ -430,20 +430,20 @@
ImageHandle ImageData::NullHandle() {
#if defined(OS_WIN)
return NULL;
-#elif defined(OS_MACOSX) || defined(OS_ANDROID)
+#elif defined(TOOLKIT_GTK)
+ return 0;
+#else
return ImageHandle();
-#else
- return 0;
#endif
}
ImageHandle ImageData::HandleFromInt(int32_t i) {
#if defined(OS_WIN)
return reinterpret_cast<ImageHandle>(i);
-#elif defined(OS_MACOSX) || defined(OS_ANDROID)
+#elif defined(TOOLKIT_GTK)
+ return static_cast<ImageHandle>(i);
+#else
return ImageHandle(i, false);
-#else
- return static_cast<ImageHandle>(i);
#endif
}
#endif // !defined(OS_NACL)
@@ -566,14 +566,14 @@
#if defined(OS_WIN)
*image_handle = dispatcher->ShareHandleWithRemote(
reinterpret_cast<HANDLE>(static_cast<intptr_t>(local_fd)), false);
-#elif defined(OS_MACOSX) || defined(OS_ANDROID)
- *image_handle = dispatcher->ShareHandleWithRemote(local_fd, false);
-#elif defined(OS_POSIX)
+#elif defined(TOOLKIT_GTK)
// On X Windows, a non-nacl handle is a SysV shared memory key.
if (is_nacl_plugin)
*image_handle = dispatcher->ShareHandleWithRemote(local_fd, false);
else
*image_handle = IPC::PlatformFileForTransit(local_fd, false);
+#elif defined(OS_POSIX)
+ *image_handle = dispatcher->ShareHandleWithRemote(local_fd, false);
#else
#error Not implemented.
#endif
@@ -602,11 +602,11 @@
if (resource) {
image_data_desc->resize(sizeof(PP_ImageDataDesc));
memcpy(&(*image_data_desc)[0], &desc, sizeof(PP_ImageDataDesc));
-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_ANDROID)
- *result_image_handle = image_handle;
-#else
+#if defined(TOOLKIT_GTK)
// On X Windows ImageHandle is a SysV shared memory key.
*result_image_handle = image_handle.fd;
+#else
+ *result_image_handle = image_handle;
#endif
} else {
image_data_desc->clear();
« no previous file with comments | « ppapi/proxy/pdf_resource.cc ('k') | ppapi/proxy/serialized_structs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698