OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2009 Google Inc. All rights reserved. | 3 * Copyright (C) 2009 Google Inc. All rights reserved. |
4 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). | 4 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 10 matching lines...) Expand all Loading... |
21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | 21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
22 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | 22 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 */ | 26 */ |
27 | 27 |
28 #ifndef Uint8ClampedArray_h | 28 #ifndef Uint8ClampedArray_h |
29 #define Uint8ClampedArray_h | 29 #define Uint8ClampedArray_h |
30 | 30 |
31 #include "wtf/MathExtras.h" | 31 #include "platform/wtf/MathExtras.h" |
32 #include "wtf/typed_arrays/Uint8Array.h" | 32 #include "platform/wtf/typed_arrays/Uint8Array.h" |
33 | 33 |
34 namespace WTF { | 34 namespace WTF { |
35 | 35 |
36 class Uint8ClampedArray final : public Uint8Array { | 36 class Uint8ClampedArray final : public Uint8Array { |
37 public: | 37 public: |
38 static inline PassRefPtr<Uint8ClampedArray> create(unsigned length); | 38 static inline PassRefPtr<Uint8ClampedArray> create(unsigned length); |
39 static inline PassRefPtr<Uint8ClampedArray> create(const unsigned char* array, | 39 static inline PassRefPtr<Uint8ClampedArray> create(const unsigned char* array, |
40 unsigned length); | 40 unsigned length); |
41 static inline PassRefPtr<Uint8ClampedArray> create(PassRefPtr<ArrayBuffer>, | 41 static inline PassRefPtr<Uint8ClampedArray> create(PassRefPtr<ArrayBuffer>, |
42 unsigned byteOffset, | 42 unsigned byteOffset, |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 Uint8ClampedArray::Uint8ClampedArray(PassRefPtr<ArrayBuffer> buffer, | 87 Uint8ClampedArray::Uint8ClampedArray(PassRefPtr<ArrayBuffer> buffer, |
88 unsigned byteOffset, | 88 unsigned byteOffset, |
89 unsigned length) | 89 unsigned length) |
90 : Uint8Array(std::move(buffer), byteOffset, length) {} | 90 : Uint8Array(std::move(buffer), byteOffset, length) {} |
91 | 91 |
92 } // namespace WTF | 92 } // namespace WTF |
93 | 93 |
94 using WTF::Uint8ClampedArray; | 94 using WTF::Uint8ClampedArray; |
95 | 95 |
96 #endif // Uint8ClampedArray_h | 96 #endif // Uint8ClampedArray_h |
OLD | NEW |