Commit 5250e171 authored by Andreas Haas's avatar Andreas Haas Committed by Commit Bot

[arraybuffer] Rename IntegralTypedArrayBase to TypedArray

This CL merges IntegralTypedArrayBase and TypedArrayBase and renames
the resulting class to TypedArray. There is no more sub-classing
happening anymore, so it makes no sense to have the base classes.
Additionally, we now use IntegralTypedArrayBase also for Float32Array.

R=haraken@chromium.org

Bug: chromium:1008840
Change-Id: I4661ff7be878ce0d7d40779ca33f8b70588baf86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1926506Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#717526}
parent 95fecfa7
......@@ -14,8 +14,7 @@ blink_core_sources("typed_arrays") {
"array_buffer/array_buffer_view.h",
"array_buffer/array_piece.cc",
"array_buffer/array_piece.h",
"array_buffer/integral_typed_array_base.h",
"array_buffer/typed_array_base.h",
"array_buffer/typed_array.h",
"array_buffer_view_helpers.h",
"dom_array_buffer.cc",
"dom_array_buffer.h",
......
......@@ -24,11 +24,12 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_TYPED_ARRAYS_ARRAY_BUFFER_INTEGRAL_TYPED_ARRAY_BASE_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_TYPED_ARRAYS_ARRAY_BUFFER_INTEGRAL_TYPED_ARRAY_BASE_H_
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_TYPED_ARRAYS_ARRAY_BUFFER_TYPED_ARRAY_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_TYPED_ARRAYS_ARRAY_BUFFER_TYPED_ARRAY_H_
#include <limits>
#include "third_party/blink/renderer/core/typed_arrays/array_buffer/typed_array_base.h"
#include "third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer.h"
#include "third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_view.h"
#include "third_party/blink/renderer/platform/wtf/math_extras.h"
namespace blink {
......@@ -36,68 +37,97 @@ namespace blink {
// Base class for all WebGL<T>Array types holding integral
// (non-floating-point) values.
template <typename T, bool clamped = false>
class IntegralTypedArrayBase : public TypedArrayBase<T> {
class TypedArray : public ArrayBufferView {
public:
static inline scoped_refptr<IntegralTypedArrayBase<T, clamped>> Create(
unsigned length);
static inline scoped_refptr<IntegralTypedArrayBase<T, clamped>> Create(
const T* array,
unsigned length);
static inline scoped_refptr<IntegralTypedArrayBase<T, clamped>>
typedef T ValueType;
static inline scoped_refptr<TypedArray<T, clamped>> Create(unsigned length);
static inline scoped_refptr<TypedArray<T, clamped>> Create(const T* array,
unsigned length);
static inline scoped_refptr<TypedArray<T, clamped>>
Create(scoped_refptr<ArrayBuffer>, unsigned byte_offset, unsigned length);
T* Data() const { return static_cast<T*>(BaseAddress()); }
T* DataMaybeShared() const {
return static_cast<T*>(BaseAddressMaybeShared());
}
unsigned length() const { return length_; }
unsigned ByteLength() const final { return length_ * sizeof(T); }
unsigned TypeSize() const final { return sizeof(T); }
inline void Set(unsigned index, double value);
inline void Set(unsigned index, uint64_t value);
ArrayBufferView::ViewType GetType() const override;
IntegralTypedArrayBase(scoped_refptr<ArrayBuffer> buffer,
unsigned byte_offset,
unsigned length)
: TypedArrayBase<T>(std::move(buffer), byte_offset, length) {}
TypedArray(scoped_refptr<ArrayBuffer> buffer,
unsigned byte_offset,
unsigned length)
: ArrayBufferView(std::move(buffer), byte_offset), length_(length) {}
// Invoked by the indexed getter. Does not perform range checks; caller
// is responsible for doing so and returning undefined as necessary.
T Item(unsigned index) const {
SECURITY_DCHECK(index < length_);
return Data()[index];
}
private:
void Detach() final {
ArrayBufferView::Detach();
length_ = 0;
}
unsigned length_;
};
template <typename T, bool clamped>
scoped_refptr<IntegralTypedArrayBase<T, clamped>>
IntegralTypedArrayBase<T, clamped>::Create(unsigned length) {
return TypedArrayBase<T>::template Create<IntegralTypedArrayBase<T, clamped>>(
length);
scoped_refptr<TypedArray<T, clamped>> TypedArray<T, clamped>::Create(
unsigned length) {
scoped_refptr<ArrayBuffer> buffer = ArrayBuffer::Create(length, sizeof(T));
return Create(std::move(buffer), 0, length);
}
template <typename T, bool clamped>
scoped_refptr<IntegralTypedArrayBase<T, clamped>>
IntegralTypedArrayBase<T, clamped>::Create(const T* array, unsigned length) {
return TypedArrayBase<T>::template Create<IntegralTypedArrayBase<T, clamped>>(
array, length);
scoped_refptr<TypedArray<T, clamped>> TypedArray<T, clamped>::Create(
const T* array,
unsigned length) {
auto a = Create(length);
if (a) {
std::memcpy(a->Data(), array, a->ByteLength());
}
return a;
}
template <typename T, bool clamped>
scoped_refptr<IntegralTypedArrayBase<T, clamped>>
IntegralTypedArrayBase<T, clamped>::Create(scoped_refptr<ArrayBuffer> buffer,
unsigned byte_offset,
unsigned length) {
return TypedArrayBase<T>::template Create<IntegralTypedArrayBase<T, clamped>>(
std::move(buffer), byte_offset, length);
scoped_refptr<TypedArray<T, clamped>> TypedArray<T, clamped>::Create(
scoped_refptr<ArrayBuffer> buffer,
unsigned byte_offset,
unsigned length) {
CHECK(VerifySubRange<T>(buffer.get(), byte_offset, length));
return base::AdoptRef(
new TypedArray<T, clamped>(std::move(buffer), byte_offset, length));
}
template <typename T, bool clamped>
inline void IntegralTypedArrayBase<T, clamped>::Set(unsigned index,
double value) {
if (index >= TypedArrayBase<T>::length_)
inline void TypedArray<T, clamped>::Set(unsigned index, double value) {
if (index >= length_)
return;
if (std::isnan(value)) // Clamp NaN to 0
value = 0;
// The double cast is necessary to get the correct wrapping
// for out-of-range values with Int32Array and Uint32Array.
TypedArrayBase<T>::Data()[index] =
static_cast<T>(static_cast<int64_t>(value));
Data()[index] = static_cast<T>(static_cast<int64_t>(value));
}
template <>
inline void IntegralTypedArrayBase<uint8_t, true>::Set(unsigned index,
double value) {
if (index >= TypedArrayBase<uint8_t>::length_) {
inline void TypedArray<uint8_t, true>::Set(unsigned index, double value) {
if (index >= length_) {
return;
}
if (std::isnan(value) || value < 0) {
......@@ -110,46 +140,40 @@ inline void IntegralTypedArrayBase<uint8_t, true>::Set(unsigned index,
}
template <>
inline void IntegralTypedArrayBase<float, false>::Set(unsigned index,
double value) {
if (index >= TypedArrayBase<float>::length_)
inline void TypedArray<float, false>::Set(unsigned index, double value) {
if (index >= length_)
return;
TypedArrayBase<float>::Data()[index] = static_cast<float>(value);
Data()[index] = static_cast<float>(value);
}
template <>
inline void IntegralTypedArrayBase<double, false>::Set(unsigned index,
double value) {
if (index >= TypedArrayBase<double>::length_)
inline void TypedArray<double, false>::Set(unsigned index, double value) {
if (index >= length_)
return;
TypedArrayBase<double>::Data()[index] = value;
Data()[index] = value;
}
template <typename T, bool clamped>
inline void IntegralTypedArrayBase<T, clamped>::Set(unsigned index,
uint64_t value) {
inline void TypedArray<T, clamped>::Set(unsigned index, uint64_t value) {
NOTREACHED();
}
template <>
inline void IntegralTypedArrayBase<int64_t, false>::Set(unsigned index,
uint64_t value) {
if (index >= TypedArrayBase<int64_t>::length_)
inline void TypedArray<int64_t, false>::Set(unsigned index, uint64_t value) {
if (index >= length_)
return;
TypedArrayBase<int64_t>::Data()[index] = static_cast<int64_t>(value);
Data()[index] = static_cast<int64_t>(value);
}
template <>
inline void IntegralTypedArrayBase<uint64_t, false>::Set(unsigned index,
uint64_t value) {
if (index >= TypedArrayBase<uint64_t>::length_)
inline void TypedArray<uint64_t, false>::Set(unsigned index, uint64_t value) {
if (index >= length_)
return;
TypedArrayBase<uint64_t>::Data()[index] = value;
Data()[index] = value;
}
template <typename T, bool clamped>
inline ArrayBufferView::ViewType IntegralTypedArrayBase<T, clamped>::GetType()
const {
inline ArrayBufferView::ViewType TypedArray<T, clamped>::GetType() const {
NOTREACHED();
return ArrayBufferView::kTypeInt16;
}
......@@ -166,11 +190,11 @@ inline ArrayBufferView::ViewType IntegralTypedArrayBase<T, clamped>::GetType()
V(int64_t, kTypeBigInt64) \
V(uint64_t, kTypeBigUint64)
#define GET_TYPE(c_type, view_type) \
template <> \
inline ArrayBufferView::ViewType \
IntegralTypedArrayBase<c_type, false>::GetType() const { \
return ArrayBufferView::view_type; \
#define GET_TYPE(c_type, view_type) \
template <> \
inline ArrayBufferView::ViewType TypedArray<c_type, false>::GetType() \
const { \
return ArrayBufferView::view_type; \
}
FOREACH_VIEW_TYPE(GET_TYPE)
......@@ -179,11 +203,10 @@ FOREACH_VIEW_TYPE(GET_TYPE)
#undef FOREACH_VIEW_TYPE
template <>
inline ArrayBufferView::ViewType
IntegralTypedArrayBase<uint8_t, true>::GetType() const {
inline ArrayBufferView::ViewType TypedArray<uint8_t, true>::GetType() const {
return ArrayBufferView::kTypeUint8Clamped;
}
} // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_CORE_TYPED_ARRAYS_ARRAY_BUFFER_INTEGRAL_TYPED_ARRAY_BASE_H_
#endif // THIRD_PARTY_BLINK_RENDERER_CORE_TYPED_ARRAYS_ARRAY_BUFFER_TYPED_ARRAY_H_
/*
* Copyright (C) 2010 Apple Inc. All rights reserved.
* Copyright (c) 2010, Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_TYPED_ARRAYS_ARRAY_BUFFER_TYPED_ARRAY_BASE_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_TYPED_ARRAYS_ARRAY_BUFFER_TYPED_ARRAY_BASE_H_
#include "third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer.h"
#include "third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_view.h"
namespace blink {
template <typename T>
class TypedArrayBase : public ArrayBufferView {
public:
typedef T ValueType;
T* Data() const { return static_cast<T*>(BaseAddress()); }
T* DataMaybeShared() const {
return static_cast<T*>(BaseAddressMaybeShared());
}
bool Set(TypedArrayBase<T>* array, unsigned offset) {
return SetImpl(array, offset * sizeof(T));
}
// Overridden from ArrayBufferView. This must be public because of
// rules about inheritance of members in template classes, and
// because it is accessed via pointers to subclasses.
unsigned length() const { return length_; }
unsigned ByteLength() const final { return length_ * sizeof(T); }
unsigned TypeSize() const final { return sizeof(T); }
// Invoked by the indexed getter. Does not perform range checks; caller
// is responsible for doing so and returning undefined as necessary.
T Item(unsigned index) const {
SECURITY_DCHECK(index < TypedArrayBase<T>::length_);
return TypedArrayBase<T>::Data()[index];
}
protected:
TypedArrayBase(scoped_refptr<ArrayBuffer> buffer,
unsigned byte_offset,
unsigned length)
: ArrayBufferView(std::move(buffer), byte_offset), length_(length) {}
template <class Subclass>
static scoped_refptr<Subclass> Create(unsigned length) {
scoped_refptr<ArrayBuffer> buffer = ArrayBuffer::Create(length, sizeof(T));
return Create<Subclass>(std::move(buffer), 0, length);
}
template <class Subclass>
static scoped_refptr<Subclass> Create(const T* array, unsigned length) {
scoped_refptr<Subclass> a = Create<Subclass>(length);
if (a) {
std::memcpy(a->Data(), array, a->ByteLength());
}
return a;
}
template <class Subclass>
static scoped_refptr<Subclass> Create(scoped_refptr<ArrayBuffer> buffer,
unsigned byte_offset,
unsigned length) {
CHECK(VerifySubRange<T>(buffer.get(), byte_offset, length));
return base::AdoptRef(new Subclass(std::move(buffer), byte_offset, length));
}
template <class Subclass>
static scoped_refptr<Subclass> CreateOrNull(unsigned length) {
scoped_refptr<ArrayBuffer> buffer =
ArrayBuffer::CreateOrNull(length, sizeof(T));
if (!buffer)
return nullptr;
return Create<Subclass>(std::move(buffer), 0, length);
}
template <class Subclass>
static scoped_refptr<Subclass> CreateUninitializedOrNull(unsigned length) {
scoped_refptr<ArrayBuffer> buffer =
ArrayBuffer::CreateUninitializedOrNull(length, sizeof(T));
if (!buffer)
return nullptr;
return Create<Subclass>(std::move(buffer), 0, length);
}
void Detach() final {
ArrayBufferView::Detach();
length_ = 0;
}
// We do not want to have to access this via a virtual function in subclasses,
// which is why it is protected rather than private.
unsigned length_;
};
} // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_CORE_TYPED_ARRAYS_ARRAY_BUFFER_TYPED_ARRAY_BASE_H_
......@@ -76,27 +76,26 @@ DOMTypedArray<TypedArray, V8TypedArray>::GetWrapperTypeInfo() const {
}
template class CORE_TEMPLATE_EXPORT
DOMTypedArray<IntegralTypedArrayBase<int8_t>, v8::Int8Array>;
DOMTypedArray<TypedArray<int8_t>, v8::Int8Array>;
template class CORE_TEMPLATE_EXPORT
DOMTypedArray<IntegralTypedArrayBase<int16_t>, v8::Int16Array>;
DOMTypedArray<TypedArray<int16_t>, v8::Int16Array>;
template class CORE_TEMPLATE_EXPORT
DOMTypedArray<IntegralTypedArrayBase<int32_t>, v8::Int32Array>;
DOMTypedArray<TypedArray<int32_t>, v8::Int32Array>;
template class CORE_TEMPLATE_EXPORT
DOMTypedArray<IntegralTypedArrayBase<uint8_t>, v8::Uint8Array>;
DOMTypedArray<TypedArray<uint8_t>, v8::Uint8Array>;
template class CORE_TEMPLATE_EXPORT
DOMTypedArray<IntegralTypedArrayBase<uint8_t, /*clamped=*/true>,
v8::Uint8ClampedArray>;
DOMTypedArray<TypedArray<uint8_t, /*clamped=*/true>, v8::Uint8ClampedArray>;
template class CORE_TEMPLATE_EXPORT
DOMTypedArray<IntegralTypedArrayBase<uint16_t>, v8::Uint16Array>;
DOMTypedArray<TypedArray<uint16_t>, v8::Uint16Array>;
template class CORE_TEMPLATE_EXPORT
DOMTypedArray<IntegralTypedArrayBase<uint32_t>, v8::Uint32Array>;
DOMTypedArray<TypedArray<uint32_t>, v8::Uint32Array>;
template class CORE_TEMPLATE_EXPORT
DOMTypedArray<IntegralTypedArrayBase<int64_t>, v8::BigInt64Array>;
DOMTypedArray<TypedArray<int64_t>, v8::BigInt64Array>;
template class CORE_TEMPLATE_EXPORT
DOMTypedArray<IntegralTypedArrayBase<uint64_t>, v8::BigUint64Array>;
DOMTypedArray<TypedArray<uint64_t>, v8::BigUint64Array>;
template class CORE_TEMPLATE_EXPORT
DOMTypedArray<IntegralTypedArrayBase<float>, v8::Float32Array>;
DOMTypedArray<TypedArray<float>, v8::Float32Array>;
template class CORE_TEMPLATE_EXPORT
DOMTypedArray<IntegralTypedArrayBase<double>, v8::Float64Array>;
DOMTypedArray<TypedArray<double>, v8::Float64Array>;
} // namespace blink
......@@ -6,7 +6,7 @@
#define THIRD_PARTY_BLINK_RENDERER_CORE_TYPED_ARRAYS_DOM_TYPED_ARRAY_H_
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/typed_arrays/array_buffer/integral_typed_array_base.h"
#include "third_party/blink/renderer/core/typed_arrays/array_buffer/typed_array.h"
#include "third_party/blink/renderer/core/typed_arrays/dom_array_buffer_view.h"
#include "third_party/blink/renderer/core/typed_arrays/dom_shared_array_buffer.h"
#include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
......@@ -81,52 +81,42 @@ class DOMTypedArray final : public DOMArrayBufferView {
};
extern template class CORE_EXTERN_TEMPLATE_EXPORT
DOMTypedArray<IntegralTypedArrayBase<int8_t>, v8::Int8Array>;
DOMTypedArray<TypedArray<int8_t>, v8::Int8Array>;
extern template class CORE_EXTERN_TEMPLATE_EXPORT
DOMTypedArray<IntegralTypedArrayBase<int16_t>, v8::Int16Array>;
DOMTypedArray<TypedArray<int16_t>, v8::Int16Array>;
extern template class CORE_EXTERN_TEMPLATE_EXPORT
DOMTypedArray<IntegralTypedArrayBase<int32_t>, v8::Int32Array>;
DOMTypedArray<TypedArray<int32_t>, v8::Int32Array>;
extern template class CORE_EXTERN_TEMPLATE_EXPORT
DOMTypedArray<IntegralTypedArrayBase<uint8_t>, v8::Uint8Array>;
DOMTypedArray<TypedArray<uint8_t>, v8::Uint8Array>;
extern template class CORE_EXTERN_TEMPLATE_EXPORT
DOMTypedArray<IntegralTypedArrayBase<uint8_t, /*clamped=*/true>,
v8::Uint8ClampedArray>;
DOMTypedArray<TypedArray<uint8_t, /*clamped=*/true>, v8::Uint8ClampedArray>;
extern template class CORE_EXTERN_TEMPLATE_EXPORT
DOMTypedArray<IntegralTypedArrayBase<uint16_t>, v8::Uint16Array>;
DOMTypedArray<TypedArray<uint16_t>, v8::Uint16Array>;
extern template class CORE_EXTERN_TEMPLATE_EXPORT
DOMTypedArray<IntegralTypedArrayBase<uint32_t>, v8::Uint32Array>;
DOMTypedArray<TypedArray<uint32_t>, v8::Uint32Array>;
extern template class CORE_EXTERN_TEMPLATE_EXPORT
DOMTypedArray<IntegralTypedArrayBase<int64_t>, v8::BigInt64Array>;
DOMTypedArray<TypedArray<int64_t>, v8::BigInt64Array>;
extern template class CORE_EXTERN_TEMPLATE_EXPORT
DOMTypedArray<IntegralTypedArrayBase<uint64_t>, v8::BigUint64Array>;
DOMTypedArray<TypedArray<uint64_t>, v8::BigUint64Array>;
extern template class CORE_EXTERN_TEMPLATE_EXPORT
DOMTypedArray<IntegralTypedArrayBase<float>, v8::Float32Array>;
DOMTypedArray<TypedArray<float>, v8::Float32Array>;
extern template class CORE_EXTERN_TEMPLATE_EXPORT
DOMTypedArray<IntegralTypedArrayBase<double>, v8::Float64Array>;
typedef DOMTypedArray<IntegralTypedArrayBase<int8_t>, v8::Int8Array>
DOMInt8Array;
typedef DOMTypedArray<IntegralTypedArrayBase<int16_t>, v8::Int16Array>
DOMInt16Array;
typedef DOMTypedArray<IntegralTypedArrayBase<int32_t>, v8::Int32Array>
DOMInt32Array;
typedef DOMTypedArray<IntegralTypedArrayBase<uint8_t>, v8::Uint8Array>
DOMUint8Array;
typedef DOMTypedArray<IntegralTypedArrayBase<uint8_t, /*clamped=*/true>,
DOMTypedArray<TypedArray<double>, v8::Float64Array>;
typedef DOMTypedArray<TypedArray<int8_t>, v8::Int8Array> DOMInt8Array;
typedef DOMTypedArray<TypedArray<int16_t>, v8::Int16Array> DOMInt16Array;
typedef DOMTypedArray<TypedArray<int32_t>, v8::Int32Array> DOMInt32Array;
typedef DOMTypedArray<TypedArray<uint8_t>, v8::Uint8Array> DOMUint8Array;
typedef DOMTypedArray<TypedArray<uint8_t, /*clamped=*/true>,
v8::Uint8ClampedArray>
DOMUint8ClampedArray;
typedef DOMTypedArray<IntegralTypedArrayBase<uint16_t>, v8::Uint16Array>
DOMUint16Array;
typedef DOMTypedArray<IntegralTypedArrayBase<uint32_t>, v8::Uint32Array>
DOMUint32Array;
typedef DOMTypedArray<IntegralTypedArrayBase<int64_t>, v8::BigInt64Array>
DOMBigInt64Array;
typedef DOMTypedArray<IntegralTypedArrayBase<uint64_t>, v8::BigUint64Array>
typedef DOMTypedArray<TypedArray<uint16_t>, v8::Uint16Array> DOMUint16Array;
typedef DOMTypedArray<TypedArray<uint32_t>, v8::Uint32Array> DOMUint32Array;
typedef DOMTypedArray<TypedArray<int64_t>, v8::BigInt64Array> DOMBigInt64Array;
typedef DOMTypedArray<TypedArray<uint64_t>, v8::BigUint64Array>
DOMBigUint64Array;
typedef DOMTypedArray<IntegralTypedArrayBase<float>, v8::Float32Array>
DOMFloat32Array;
typedef DOMTypedArray<IntegralTypedArrayBase<double>, v8::Float64Array>
DOMFloat64Array;
typedef DOMTypedArray<TypedArray<float>, v8::Float32Array> DOMFloat32Array;
typedef DOMTypedArray<TypedArray<double>, v8::Float64Array> DOMFloat64Array;
} // namespace blink
......
......@@ -34,11 +34,11 @@ class TypedFlexibleArrayBufferView final : public FlexibleArrayBufferView {
};
using FlexibleFloat32ArrayView =
TypedFlexibleArrayBufferView<IntegralTypedArrayBase<float>>;
TypedFlexibleArrayBufferView<TypedArray<float>>;
using FlexibleInt32ArrayView =
TypedFlexibleArrayBufferView<IntegralTypedArrayBase<int32_t>>;
TypedFlexibleArrayBufferView<TypedArray<int32_t>>;
using FlexibleUint32ArrayView =
TypedFlexibleArrayBufferView<IntegralTypedArrayBase<uint32_t>>;
TypedFlexibleArrayBufferView<TypedArray<uint32_t>>;
} // namespace blink
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment