| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef ArrayBufferView_h | 26 #ifndef ArrayBufferView_h |
| 27 #define ArrayBufferView_h | 27 #define ArrayBufferView_h |
| 28 | 28 |
| 29 #include <wtf/ArrayBuffer.h> | 29 #include <wtf/ArrayBuffer.h> |
| 30 | 30 |
| 31 #include <algorithm> | 31 #include <algorithm> |
| 32 #include <limits.h> | 32 #include <limits.h> |
| 33 #include <wtf/PassRefPtr.h> | 33 #include "wtf/PassRefPtr.h" |
| 34 #include <wtf/RefCounted.h> | 34 #include "wtf/RefCounted.h" |
| 35 #include <wtf/RefPtr.h> | 35 #include "wtf/RefPtr.h" |
| 36 #include "wtf/WTFExport.h" |
| 36 | 37 |
| 37 namespace WTF { | 38 namespace WTF { |
| 38 | 39 |
| 39 class ArrayBufferView : public RefCounted<ArrayBufferView> { | 40 class WTF_EXPORT ArrayBufferView : public RefCounted<ArrayBufferView> { |
| 40 public: | 41 public: |
| 41 enum ViewType { | 42 enum ViewType { |
| 42 TypeInt8, | 43 TypeInt8, |
| 43 TypeUint8, | 44 TypeUint8, |
| 44 TypeUint8Clamped, | 45 TypeUint8Clamped, |
| 45 TypeInt16, | 46 TypeInt16, |
| 46 TypeUint16, | 47 TypeUint16, |
| 47 TypeInt32, | 48 TypeInt32, |
| 48 TypeUint32, | 49 TypeUint32, |
| 49 TypeFloat32, | 50 TypeFloat32, |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 end = start; | 196 end = start; |
| 196 *offset = static_cast<unsigned>(start); | 197 *offset = static_cast<unsigned>(start); |
| 197 *length = static_cast<unsigned>(end - start); | 198 *length = static_cast<unsigned>(end - start); |
| 198 } | 199 } |
| 199 | 200 |
| 200 } // namespace WTF | 201 } // namespace WTF |
| 201 | 202 |
| 202 using WTF::ArrayBufferView; | 203 using WTF::ArrayBufferView; |
| 203 | 204 |
| 204 #endif // ArrayBufferView_h | 205 #endif // ArrayBufferView_h |
| OLD | NEW |