summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/pepper_plugin_delegate_impl.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-09 03:06:51 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-09 03:06:51 +0000
commit3f5ca5c7f09aa0542d5e9bf9da76a4b1c408d1e0 (patch)
treeb877715dc62601ad153e89a5315a34b197398533 /chrome/renderer/pepper_plugin_delegate_impl.cc
parentf9610ab5622cef8a8ac0d3ad421e0bd2d75a0d8f (diff)
downloadchromium_src-3f5ca5c7f09aa0542d5e9bf9da76a4b1c408d1e0.zip
chromium_src-3f5ca5c7f09aa0542d5e9bf9da76a4b1c408d1e0.tar.gz
chromium_src-3f5ca5c7f09aa0542d5e9bf9da76a4b1c408d1e0.tar.bz2
Change the private image data shared memory handle code to return a native
memory handle and a size rather than the internal TransportDIB structure. TEST=none BUG=none Review URL: http://codereview.chromium.org/4611001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65482 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/pepper_plugin_delegate_impl.cc')
-rw-r--r--chrome/renderer/pepper_plugin_delegate_impl.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/chrome/renderer/pepper_plugin_delegate_impl.cc b/chrome/renderer/pepper_plugin_delegate_impl.cc
index d056fdb..f897435 100644
--- a/chrome/renderer/pepper_plugin_delegate_impl.cc
+++ b/chrome/renderer/pepper_plugin_delegate_impl.cc
@@ -65,8 +65,15 @@ class PlatformImage2DImpl : public pepper::PluginDelegate::PlatformImage2D {
return dib_->GetPlatformCanvas(width_, height_);
}
- virtual intptr_t GetSharedMemoryHandle() const {
- return reinterpret_cast<intptr_t>(dib_.get());
+ virtual intptr_t GetSharedMemoryHandle(uint32* byte_count) const {
+ *byte_count = dib_->size();
+#if defined(OS_WIN)
+ return reinterpret_cast<intptr_t>(dib_->handle());
+#elif defined(OS_MACOSX)
+ return static_cast<intptr_t>(dib_->handle().fd);
+#elif defined(OS_LINUX)
+ return static_cast<intptr_t>(dib_->handle());
+#endif
}
virtual TransportDIB* GetTransportDIB() const {