| 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
|
| }
|
|
|
|
|