| Index: content/renderer/pepper/ppb_image_data_impl.h
|
| diff --git a/content/renderer/pepper/ppb_image_data_impl.h b/content/renderer/pepper/ppb_image_data_impl.h
|
| index a16bbfa104b2a9cd9d06a5bffab82dbb8ba57383..578854cfe80998dae89630ca526543053ee9ac9a 100644
|
| --- a/content/renderer/pepper/ppb_image_data_impl.h
|
| +++ b/content/renderer/pepper/ppb_image_data_impl.h
|
| @@ -51,8 +51,15 @@ class CONTENT_EXPORT PPB_ImageData_Impl
|
| // If you call this constructor, you must also call Init before use. Normally
|
| // you should use the static Create function, but this constructor is needed
|
| // for some internal uses of ImageData (like Graphics2D).
|
| + // |is_browser_allocated| indicates whether the backing shared memory should
|
| + // be allocated by the browser process.
|
| PPB_ImageData_Impl(PP_Instance instance,
|
| - PPB_ImageData_Shared::ImageDataType type);
|
| + PPB_ImageData_Shared::ImageDataType type,
|
| + bool is_browser_allocated);
|
| +
|
| + // Returns true if the ImageData shared memory should be allocated in the
|
| + // browser process for the current platform.
|
| + static bool IsBrowserAllocated(ImageDataType format);
|
|
|
| bool Init(PP_ImageDataFormat format,
|
| int width, int height,
|
| @@ -102,7 +109,7 @@ class CONTENT_EXPORT PPB_ImageData_Impl
|
|
|
| class ImageDataPlatformBackend : public PPB_ImageData_Impl::Backend {
|
| public:
|
| - ImageDataPlatformBackend();
|
| + ImageDataPlatformBackend(bool is_browser_allocated);
|
| virtual ~ImageDataPlatformBackend();
|
|
|
| // PPB_ImageData_Impl::Backend implementation.
|
| @@ -124,6 +131,8 @@ class ImageDataPlatformBackend : public PPB_ImageData_Impl::Backend {
|
| int height_;
|
| scoped_ptr<TransportDIB> dib_;
|
|
|
| + bool is_browser_allocated_;
|
| +
|
| // When the device is mapped, this is the image. Null when umapped.
|
| scoped_ptr<SkCanvas> mapped_canvas_;
|
|
|
|
|