OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 15 matching lines...) Expand all Loading... |
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 */ | 27 */ |
28 | 28 |
29 #ifndef ImageData_h | 29 #ifndef ImageData_h |
30 #define ImageData_h | 30 #define ImageData_h |
31 | 31 |
32 #include "bindings/core/v8/ScriptWrappable.h" | 32 #include "bindings/core/v8/ScriptWrappable.h" |
33 #include "bindings/core/v8/Uint8ClampedArrayOrUint16ArrayOrFloat32Array.h" | 33 #include "bindings/core/v8/Uint8ClampedArrayOrUint16ArrayOrFloat32Array.h" |
34 #include "core/CoreExport.h" | 34 #include "core/CoreExport.h" |
35 #include "core/dom/DOMTypedArray.h" | 35 #include "core/dom/DOMTypedArray.h" |
36 #include "core/dom/NotShared.h" | |
37 #include "core/html/ImageDataColorSettings.h" | 36 #include "core/html/ImageDataColorSettings.h" |
38 #include "core/html/canvas/CanvasRenderingContext.h" | 37 #include "core/html/canvas/CanvasRenderingContext.h" |
39 #include "core/imagebitmap/ImageBitmapSource.h" | 38 #include "core/imagebitmap/ImageBitmapSource.h" |
40 #include "platform/geometry/IntRect.h" | 39 #include "platform/geometry/IntRect.h" |
41 #include "platform/geometry/IntSize.h" | 40 #include "platform/geometry/IntSize.h" |
42 #include "platform/heap/Handle.h" | 41 #include "platform/heap/Handle.h" |
43 #include "third_party/skia/include/core/SkColorSpace.h" | 42 #include "third_party/skia/include/core/SkColorSpace.h" |
44 #include "wtf/CheckedNumeric.h" | 43 #include "wtf/CheckedNumeric.h" |
45 #include "wtf/Compiler.h" | 44 #include "wtf/Compiler.h" |
46 #include "wtf/text/WTFString.h" | 45 #include "wtf/text/WTFString.h" |
(...skipping 24 matching lines...) Expand all Loading... |
71 | 70 |
72 class CORE_EXPORT ImageData final : public GarbageCollectedFinalized<ImageData>, | 71 class CORE_EXPORT ImageData final : public GarbageCollectedFinalized<ImageData>, |
73 public ScriptWrappable, | 72 public ScriptWrappable, |
74 public ImageBitmapSource { | 73 public ImageBitmapSource { |
75 DEFINE_WRAPPERTYPEINFO(); | 74 DEFINE_WRAPPERTYPEINFO(); |
76 | 75 |
77 public: | 76 public: |
78 static ImageData* Create(const IntSize&, | 77 static ImageData* Create(const IntSize&, |
79 const ImageDataColorSettings* = nullptr); | 78 const ImageDataColorSettings* = nullptr); |
80 static ImageData* Create(const IntSize&, | 79 static ImageData* Create(const IntSize&, |
81 NotShared<DOMArrayBufferView>, | 80 DOMArrayBufferView*, |
82 const ImageDataColorSettings* = nullptr); | 81 const ImageDataColorSettings* = nullptr); |
83 | 82 |
84 static ImageData* Create(unsigned width, unsigned height, ExceptionState&); | 83 static ImageData* Create(unsigned width, unsigned height, ExceptionState&); |
85 static ImageData* Create(NotShared<DOMUint8ClampedArray>, | 84 static ImageData* Create(DOMUint8ClampedArray*, |
86 unsigned width, | 85 unsigned width, |
87 ExceptionState&); | 86 ExceptionState&); |
88 static ImageData* Create(NotShared<DOMUint8ClampedArray>, | 87 static ImageData* Create(DOMUint8ClampedArray*, |
89 unsigned width, | 88 unsigned width, |
90 unsigned height, | 89 unsigned height, |
91 ExceptionState&); | 90 ExceptionState&); |
92 | 91 |
93 ImageData* createImageData(unsigned width, | 92 ImageData* createImageData(unsigned width, |
94 unsigned height, | 93 unsigned height, |
95 const ImageDataColorSettings&, | 94 const ImageDataColorSettings&, |
96 ExceptionState&); | 95 ExceptionState&); |
97 ImageData* createImageData(ImageDataArray&, | 96 ImageData* createImageData(ImageDataArray&, |
98 unsigned width, | 97 unsigned width, |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 static DOMFloat32Array* ConvertFloat16ArrayToFloat32Array(const uint16_t*, | 191 static DOMFloat32Array* ConvertFloat16ArrayToFloat32Array(const uint16_t*, |
193 unsigned); | 192 unsigned); |
194 | 193 |
195 static sk_sp<SkColorSpace> GetSkColorSpace(const CanvasColorSpace&, | 194 static sk_sp<SkColorSpace> GetSkColorSpace(const CanvasColorSpace&, |
196 const CanvasPixelFormat&); | 195 const CanvasPixelFormat&); |
197 }; | 196 }; |
198 | 197 |
199 } // namespace blink | 198 } // namespace blink |
200 | 199 |
201 #endif // ImageData_h | 200 #endif // ImageData_h |
OLD | NEW |