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

Unified Diff: content/renderer/pepper/pepper_platform_image_2d_impl.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, 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: content/renderer/pepper/pepper_platform_image_2d_impl.cc
===================================================================
--- content/renderer/pepper/pepper_platform_image_2d_impl.cc (revision 192603)
+++ content/renderer/pepper/pepper_platform_image_2d_impl.cc (working copy)
@@ -19,9 +19,9 @@
dib_(dib) {
}
-// On Mac, we have to tell the browser to free the transport DIB.
+// On POSIX, we have to tell the browser to free the transport DIB.
PepperPlatformImage2DImpl::~PepperPlatformImage2DImpl() {
-#if defined(OS_MACOSX)
+#if defined(OS_POSIX) && !defined(TOOLKIT_GTK) && !defined(OS_ANDROID)
if (dib_.get()) {
RenderThreadImpl::current()->Send(
new ViewHostMsg_FreeTransportDIB(dib_->id()));
@@ -35,7 +35,7 @@
uint32 buffer_size = width * height * 4;
// Allocate the transport DIB and the PlatformCanvas pointing to it.
-#if defined(OS_MACOSX)
+#if defined(OS_POSIX) && !defined(TOOLKIT_GTK) && !defined(OS_ANDROID)
// On the Mac, shared memory has to be created in the browser in order to
// work in the sandbox. Do this by sending a message to the browser
// requesting a TransportDIB (see also
@@ -72,10 +72,10 @@
*byte_count = dib_->size();
#if defined(OS_WIN)
return reinterpret_cast<intptr_t>(dib_->handle());
-#elif defined(OS_MACOSX) || defined(OS_ANDROID)
+#elif defined(TOOLKIT_GTK)
+ return static_cast<intptr_t>(dib_->handle());
+#else
return static_cast<intptr_t>(dib_->handle().fd);
-#elif defined(OS_POSIX)
- return static_cast<intptr_t>(dib_->handle());
#endif
}

Powered by Google App Engine
This is Rietveld 408576698