summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/plugins/pepper_image_data.cc8
-rw-r--r--webkit/glue/plugins/pepper_image_data.h2
-rw-r--r--webkit/glue/plugins/pepper_plugin_delegate.h7
3 files changed, 9 insertions, 8 deletions
diff --git a/webkit/glue/plugins/pepper_image_data.cc b/webkit/glue/plugins/pepper_image_data.cc
index 702abee..92d4364 100644
--- a/webkit/glue/plugins/pepper_image_data.cc
+++ b/webkit/glue/plugins/pepper_image_data.cc
@@ -79,10 +79,10 @@ void Unmap(PP_Resource resource) {
image_data->Unmap();
}
-uint64_t GetNativeMemoryHandle2(PP_Resource resource) {
+uint64_t GetNativeMemoryHandle2(PP_Resource resource, uint32_t* byte_count) {
scoped_refptr<ImageData> image_data(Resource::GetAs<ImageData>(resource));
if (image_data)
- return image_data->GetNativeMemoryHandle();
+ return image_data->GetNativeMemoryHandle(byte_count);
return 0;
}
@@ -189,8 +189,8 @@ void ImageData::Unmap() {
// in the future to save some memory.
}
-uint64 ImageData::GetNativeMemoryHandle() const {
- return platform_image_->GetSharedMemoryHandle();
+uint64 ImageData::GetNativeMemoryHandle(uint32* byte_count) const {
+ return platform_image_->GetSharedMemoryHandle(byte_count);
}
const SkBitmap* ImageData::GetMappedBitmap() const {
diff --git a/webkit/glue/plugins/pepper_image_data.h b/webkit/glue/plugins/pepper_image_data.h
index b657173..473d4aa 100644
--- a/webkit/glue/plugins/pepper_image_data.h
+++ b/webkit/glue/plugins/pepper_image_data.h
@@ -64,7 +64,7 @@ class ImageData : public Resource {
void Unmap();
// PPB_ImageDataTrusted implementation.
- uint64 GetNativeMemoryHandle() const;
+ uint64 GetNativeMemoryHandle(uint32* byte_count) const;
// The mapped bitmap and canvas will be NULL if the image is not mapped.
skia::PlatformCanvas* mapped_canvas() const { return mapped_canvas_.get(); }
diff --git a/webkit/glue/plugins/pepper_plugin_delegate.h b/webkit/glue/plugins/pepper_plugin_delegate.h
index d2c67c7..5e6f9a2 100644
--- a/webkit/glue/plugins/pepper_plugin_delegate.h
+++ b/webkit/glue/plugins/pepper_plugin_delegate.h
@@ -78,9 +78,10 @@ class PluginDelegate {
virtual skia::PlatformCanvas* Map() = 0;
// Returns the platform-specific shared memory handle of the data backing
- // this image. This is used by NativeClient to send the image to the
- // out-of-process plugin. Returns 0 on failure.
- virtual intptr_t GetSharedMemoryHandle() const = 0;
+ // this image. This is used by PPAPI proxying to send the image to the
+ // out-of-process plugin. On success, the size in bytes will be placed into
+ // |*bytes_count|. Returns 0 on failure.
+ virtual intptr_t GetSharedMemoryHandle(uint32* byte_count) const = 0;
virtual TransportDIB* GetTransportDIB() const = 0;
};