class Backend {
public:
virtual ~Backend() {};
- virtual bool Init(PPB_ImageData_Impl* impl, PP_ImageDataFormat format,
- int width, int height, bool init_to_zero) = 0;
+ virtual bool Init(PPB_ImageData_Impl* impl,
+ PP_ImageDataFormat format,
+ int width,
+ int height,
+ bool init_to_zero) = 0;
virtual bool IsMapped() const = 0;
virtual TransportDIB* GetTransportDIB() const = 0;
virtual void* Map() = 0;
// Constructor used for unittests. The ImageData is always allocated locally.
struct ForTest {};
- PPB_ImageData_Impl(PP_Instance instance,
- ForTest);
+ PPB_ImageData_Impl(PP_Instance instance, ForTest);
bool Init(PP_ImageDataFormat format,
- int width, int height,
+ int width,
+ int height,
bool init_to_zero);
static PP_Resource Create(PP_Instance pp_instance,
virtual ~ImageDataPlatformBackend();
// PPB_ImageData_Impl::Backend implementation.
- virtual bool Init(PPB_ImageData_Impl* impl, PP_ImageDataFormat format,
- int width, int height, bool init_to_zero) OVERRIDE;
+ virtual bool Init(PPB_ImageData_Impl* impl,
+ PP_ImageDataFormat format,
+ int width,
+ int height,
+ bool init_to_zero) OVERRIDE;
virtual bool IsMapped() const OVERRIDE;
virtual TransportDIB* GetTransportDIB() const OVERRIDE;
virtual void* Map() OVERRIDE;
virtual ~ImageDataSimpleBackend();
// PPB_ImageData_Impl::Backend implementation.
- virtual bool Init(PPB_ImageData_Impl* impl, PP_ImageDataFormat format,
- int width, int height, bool init_to_zero) OVERRIDE;
+ virtual bool Init(PPB_ImageData_Impl* impl,
+ PP_ImageDataFormat format,
+ int width,
+ int height,
+ bool init_to_zero) OVERRIDE;
virtual bool IsMapped() const OVERRIDE;
virtual TransportDIB* GetTransportDIB() const OVERRIDE;
virtual void* Map() OVERRIDE;
class ImageDataAutoMapper {
public:
explicit ImageDataAutoMapper(PPB_ImageData_Impl* image_data)
- : image_data_(image_data) {
+ : image_data_(image_data) {
if (image_data_->IsMapped()) {
is_valid_ = true;
needs_unmap_ = false;