| Index: third_party/WebKit/Source/core/html/ImageData.h
|
| diff --git a/third_party/WebKit/Source/core/html/ImageData.h b/third_party/WebKit/Source/core/html/ImageData.h
|
| index 7b0005953bcb1e64c89d3d329babd472c2aa0955..a826cbdf3a2a8d0ff1cfd47872249801ef748119 100644
|
| --- a/third_party/WebKit/Source/core/html/ImageData.h
|
| +++ b/third_party/WebKit/Source/core/html/ImageData.h
|
| @@ -79,8 +79,11 @@ class CORE_EXPORT ImageData final : public GarbageCollectedFinalized<ImageData>,
|
| DEFINE_WRAPPERTYPEINFO();
|
|
|
| public:
|
| - static ImageData* create(const IntSize&);
|
| - static ImageData* create(const IntSize&, DOMUint8ClampedArray*);
|
| + static ImageData* create(const IntSize&,
|
| + const ImageDataColorSettings* = nullptr);
|
| + static ImageData* create(const IntSize&,
|
| + DOMArrayBufferView*,
|
| + const ImageDataColorSettings* = nullptr);
|
|
|
| static ImageData* create(unsigned width, unsigned height, ExceptionState&);
|
| static ImageData* create(DOMUint8ClampedArray*,
|
| @@ -103,7 +106,14 @@ class CORE_EXPORT ImageData final : public GarbageCollectedFinalized<ImageData>,
|
| const ImageDataColorSettings&,
|
| ExceptionState&);
|
|
|
| + static CanvasColorSpace getCanvasColorSpace(const String&);
|
| static ImageDataStorageFormat getImageDataStorageFormat(const String&);
|
| + static unsigned getStorageFormatDataSize(const String&);
|
| + static DOMArrayBufferView*
|
| + convertPixelsFromCanvasPixelFormatToImageDataStorageFormat(
|
| + WTF::ArrayBufferContents&,
|
| + CanvasPixelFormat,
|
| + ImageDataStorageFormat);
|
|
|
| IntSize size() const { return m_size; }
|
| int width() const { return m_size.width(); }
|
| @@ -122,6 +132,8 @@ class CORE_EXPORT ImageData final : public GarbageCollectedFinalized<ImageData>,
|
| };
|
|
|
| sk_sp<SkColorSpace> getSkColorSpace();
|
| + unsigned char* getImageDataInCanvasColorSettings(const CanvasColorSpace&,
|
| + const CanvasPixelFormat&);
|
|
|
| // ImageBitmapSource implementation
|
| IntSize bitmapSourceSize() const override { return m_size; }
|
| @@ -138,12 +150,14 @@ class CORE_EXPORT ImageData final : public GarbageCollectedFinalized<ImageData>,
|
| const WrapperTypeInfo*,
|
| v8::Local<v8::Object> wrapper) override;
|
|
|
| - static bool validateConstructorArguments(const unsigned&,
|
| - const IntSize* = nullptr,
|
| - const unsigned& = 0,
|
| - const unsigned& = 0,
|
| - const DOMArrayBufferView* = nullptr,
|
| - ExceptionState* = nullptr);
|
| + static bool validateConstructorArguments(
|
| + const unsigned&,
|
| + const IntSize* = nullptr,
|
| + const unsigned& = 0,
|
| + const unsigned& = 0,
|
| + const DOMArrayBufferView* = nullptr,
|
| + const ImageDataColorSettings* = nullptr,
|
| + ExceptionState* = nullptr);
|
|
|
| private:
|
| ImageData(const IntSize&,
|
| @@ -162,6 +176,28 @@ class CORE_EXPORT ImageData final : public GarbageCollectedFinalized<ImageData>,
|
| const unsigned&,
|
| ImageDataStorageFormat,
|
| ExceptionState* = nullptr);
|
| +
|
| + static DOMUint8ClampedArray* allocateAndValidateUint8ClampedArray(
|
| + const unsigned&,
|
| + ExceptionState* = nullptr);
|
| +
|
| + static DOMUint16Array* allocateAndValidateUint16Array(
|
| + const unsigned&,
|
| + ExceptionState* = nullptr);
|
| +
|
| + static DOMFloat32Array* allocateAndValidateFloat32Array(
|
| + const unsigned&,
|
| + ExceptionState* = nullptr);
|
| +
|
| + static DOMFloat32Array* convertFloat16ArrayToFloat32Array(const uint16_t*,
|
| + unsigned);
|
| + // static uint16_t* convertFloat32ArrayToFloat16Array(const float*, unsigned);
|
| +
|
| + // uint8_t* getImageDataInUint8ClampedArray();
|
| + // uint16_t* getImageDataInFloat16Array();
|
| +
|
| + static sk_sp<SkColorSpace> getSkColorSpace(const CanvasColorSpace&,
|
| + const CanvasPixelFormat&);
|
| };
|
|
|
| } // namespace blink
|
|
|