Chromium Code Reviews

Unified Diff: webkit/glue/plugins/pepper_image_data.cc

Issue 5410001: Change trusted shared memory interface to match audio.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « webkit/glue/plugins/pepper_image_data.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/pepper_image_data.cc
===================================================================
--- webkit/glue/plugins/pepper_image_data.cc (revision 67614)
+++ webkit/glue/plugins/pepper_image_data.cc (working copy)
@@ -79,11 +79,15 @@
image_data->Unmap();
}
-uint64_t GetNativeMemoryHandle2(PP_Resource resource, uint32_t* byte_count) {
+int32_t GetSharedMemory(PP_Resource resource,
+ int* handle,
+ uint32_t* byte_count) {
scoped_refptr<ImageData> image_data(Resource::GetAs<ImageData>(resource));
- if (image_data)
- return image_data->GetNativeMemoryHandle(byte_count);
- return 0;
+ if (image_data) {
+ *handle = image_data->GetSharedMemoryHandle(byte_count);
+ return PP_OK;
+ }
+ return PP_ERROR_BADRESOURCE;
}
const PPB_ImageData ppb_imagedata = {
@@ -97,7 +101,7 @@
};
const PPB_ImageDataTrusted ppb_imagedata_trusted = {
- &GetNativeMemoryHandle2,
+ &GetSharedMemory,
};
} // namespace
@@ -189,7 +193,7 @@
// in the future to save some memory.
}
-uint64 ImageData::GetNativeMemoryHandle(uint32* byte_count) const {
+int ImageData::GetSharedMemoryHandle(uint32* byte_count) const {
return platform_image_->GetSharedMemoryHandle(byte_count);
}
« no previous file with comments | « webkit/glue/plugins/pepper_image_data.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine