| 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 24 matching lines...) Expand all Loading... |
| 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* arra
y, unsigned length); | 39 static inline PassRefPtr<Uint8ClampedArray> create(const unsigned char* arra
y, unsigned length); |
| 40 static inline PassRefPtr<Uint8ClampedArray> create(PassRefPtr<ArrayBuffer>,
unsigned byteOffset, unsigned length); | 40 static inline PassRefPtr<Uint8ClampedArray> create(PassRefPtr<ArrayBuffer>,
unsigned byteOffset, unsigned length); |
| 41 | 41 |
| 42 using TypedArrayBase<unsigned char>::set; | 42 using TypedArrayBase<unsigned char>::set; |
| 43 inline void set(unsigned index, double value); | 43 inline void set(unsigned index, double value); |
| 44 | 44 |
| 45 virtual ViewType type() const override | 45 ViewType type() const override |
| 46 { | 46 { |
| 47 return TypeUint8Clamped; | 47 return TypeUint8Clamped; |
| 48 } | 48 } |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 inline Uint8ClampedArray(PassRefPtr<ArrayBuffer>, | 51 inline Uint8ClampedArray(PassRefPtr<ArrayBuffer>, |
| 52 unsigned byteOffset, | 52 unsigned byteOffset, |
| 53 unsigned length); | 53 unsigned length); |
| 54 // Make constructor visible to superclass. | 54 // Make constructor visible to superclass. |
| 55 friend class TypedArrayBase<unsigned char>; | 55 friend class TypedArrayBase<unsigned char>; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 84 Uint8ClampedArray::Uint8ClampedArray(PassRefPtr<ArrayBuffer> buffer, unsigned by
teOffset, unsigned length) | 84 Uint8ClampedArray::Uint8ClampedArray(PassRefPtr<ArrayBuffer> buffer, unsigned by
teOffset, unsigned length) |
| 85 : Uint8Array(buffer, byteOffset, length) | 85 : Uint8Array(buffer, byteOffset, length) |
| 86 { | 86 { |
| 87 } | 87 } |
| 88 | 88 |
| 89 } // namespace WTF | 89 } // namespace WTF |
| 90 | 90 |
| 91 using WTF::Uint8ClampedArray; | 91 using WTF::Uint8ClampedArray; |
| 92 | 92 |
| 93 #endif // Uint8ClampedArray_h | 93 #endif // Uint8ClampedArray_h |
| OLD | NEW |