Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: third_party/WebKit/Source/core/html/Float32ImageData.h

Issue 2707243006: [SharedArrayBuffer] Prevent SharedArrayBuffer being used in Web APIs (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef Float32ImageData_h 5 #ifndef Float32ImageData_h
6 #define Float32ImageData_h 6 #define Float32ImageData_h
7 7
8 #include "bindings/core/v8/ScriptWrappable.h" 8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "core/CoreExport.h" 9 #include "core/CoreExport.h"
10 #include "core/dom/DOMTypedArray.h" 10 #include "core/dom/DOMTypedArray.h"
11 #include "core/dom/MaybeShared.h"
11 #include "core/html/ImageData.h" 12 #include "core/html/ImageData.h"
12 #include "core/imagebitmap/ImageBitmapSource.h" 13 #include "core/imagebitmap/ImageBitmapSource.h"
13 #include "platform/geometry/IntRect.h" 14 #include "platform/geometry/IntRect.h"
14 #include "platform/geometry/IntSize.h" 15 #include "platform/geometry/IntSize.h"
15 #include "platform/heap/Handle.h" 16 #include "platform/heap/Handle.h"
16 #include "wtf/Compiler.h" 17 #include "wtf/Compiler.h"
17 #include "wtf/text/WTFString.h" 18 #include "wtf/text/WTFString.h"
18 19
19 namespace blink { 20 namespace blink {
20 21
21 class ExceptionState; 22 class ExceptionState;
22 23
23 class CORE_EXPORT Float32ImageData final 24 class CORE_EXPORT Float32ImageData final
24 : public GarbageCollected<Float32ImageData>, 25 : public GarbageCollected<Float32ImageData>,
25 public ScriptWrappable { 26 public ScriptWrappable {
26 DEFINE_WRAPPERTYPEINFO(); 27 DEFINE_WRAPPERTYPEINFO();
27 28
28 public: 29 public:
29 static Float32ImageData* create(const IntSize&); 30 static Float32ImageData* create(const IntSize&);
30 static Float32ImageData* create(const IntSize&, DOMFloat32Array*); 31 static Float32ImageData* create(const IntSize&,
32 const MaybeShared<DOMFloat32Array>&);
31 static Float32ImageData* create(unsigned width, 33 static Float32ImageData* create(unsigned width,
32 unsigned height, 34 unsigned height,
33 ExceptionState&); 35 ExceptionState&);
34 static Float32ImageData* create(unsigned width, 36 static Float32ImageData* create(unsigned width,
35 unsigned height, 37 unsigned height,
36 String colorSpace, 38 String colorSpace,
37 ExceptionState&); 39 ExceptionState&);
38 static Float32ImageData* create(DOMFloat32Array*, 40 static Float32ImageData* create(const MaybeShared<DOMFloat32Array>&,
39 unsigned width, 41 unsigned width,
40 ExceptionState&); 42 ExceptionState&);
41 static Float32ImageData* create(DOMFloat32Array*, 43 static Float32ImageData* create(const MaybeShared<DOMFloat32Array>&,
42 unsigned width, 44 unsigned width,
43 String colorSpace, 45 String colorSpace,
44 ExceptionState&); 46 ExceptionState&);
45 static Float32ImageData* create(DOMFloat32Array*, 47 static Float32ImageData* create(const MaybeShared<DOMFloat32Array>&,
46 unsigned width, 48 unsigned width,
47 unsigned height, 49 unsigned height,
48 ExceptionState&); 50 ExceptionState&);
49 static Float32ImageData* create(DOMFloat32Array*, 51 static Float32ImageData* create(const MaybeShared<DOMFloat32Array>&,
50 unsigned width, 52 unsigned width,
51 unsigned height, 53 unsigned height,
52 String colorSpace, 54 String colorSpace,
53 ExceptionState&); 55 ExceptionState&);
54 56
55 IntSize size() const { return m_size; } 57 IntSize size() const { return m_size; }
56 int width() const { return m_size.width(); } 58 int width() const { return m_size.width(); }
57 int height() const { return m_size.height(); } 59 int height() const { return m_size.height(); }
58 String colorSpace() const { 60 String colorSpace() const {
59 return ImageData::getImageDataColorSpaceName(m_colorSpace); 61 return ImageData::getImageDataColorSpaceName(m_colorSpace);
(...skipping 27 matching lines...) Expand all
87 ExceptionState* = nullptr); 89 ExceptionState* = nullptr);
88 90
89 static DOMFloat32Array* allocateAndValidateFloat32Array( 91 static DOMFloat32Array* allocateAndValidateFloat32Array(
90 const unsigned&, 92 const unsigned&,
91 ExceptionState* = nullptr); 93 ExceptionState* = nullptr);
92 }; 94 };
93 95
94 } // namespace blink 96 } // namespace blink
95 97
96 #endif // Float32ImageData_h 98 #endif // Float32ImageData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698