Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dart::TypedDataMessageDeserializationCluster Class Reference
Inheritance diagram for dart::TypedDataMessageDeserializationCluster:
dart::MessageDeserializationCluster dart::ZoneAllocated

Public Member Functions

 TypedDataMessageDeserializationCluster (intptr_t cid)
 
 ~TypedDataMessageDeserializationCluster ()
 
void ReadNodes (MessageDeserializer *d)
 
void ReadNodesApi (ApiMessageDeserializer *d)
 
- Public Member Functions inherited from dart::MessageDeserializationCluster
 MessageDeserializationCluster (const char *name, bool is_canonical=false)
 
virtual ~MessageDeserializationCluster ()
 
virtual void ReadEdges (MessageDeserializer *d)
 
virtual ObjectPtr PostLoad (MessageDeserializer *d)
 
virtual void ReadEdgesApi (ApiMessageDeserializer *d)
 
virtual void PostLoadApi (ApiMessageDeserializer *d)
 
void ReadNodesWrapped (MessageDeserializer *d)
 
void ReadNodesWrappedApi (ApiMessageDeserializer *d)
 
const char * name () const
 
bool is_canonical () const
 
- Public Member Functions inherited from dart::ZoneAllocated
 ZoneAllocated ()
 
void * operator new (size_t size)
 
void * operator new (size_t size, Zone *zone)
 
void operator delete (void *pointer)
 

Additional Inherited Members

- Protected Member Functions inherited from dart::MessageDeserializationCluster
ObjectPtr PostLoadAbstractType (MessageDeserializer *d)
 
ObjectPtr PostLoadLinkedHash (MessageDeserializer *d)
 
 DISALLOW_COPY_AND_ASSIGN (MessageDeserializationCluster)
 
- Protected Attributes inherited from dart::MessageDeserializationCluster
const char *const name_
 
const bool is_canonical_
 
intptr_t start_index_
 
intptr_t stop_index_
 

Detailed Description

Definition at line 1188 of file message_snapshot.cc.

Constructor & Destructor Documentation

◆ TypedDataMessageDeserializationCluster()

dart::TypedDataMessageDeserializationCluster::TypedDataMessageDeserializationCluster ( intptr_t  cid)
inlineexplicit

Definition at line 1191 of file message_snapshot.cc.

1192 : MessageDeserializationCluster("TypedData"), cid_(cid) {}
MessageDeserializationCluster(const char *name, bool is_canonical=false)
const intptr_t cid

◆ ~TypedDataMessageDeserializationCluster()

dart::TypedDataMessageDeserializationCluster::~TypedDataMessageDeserializationCluster ( )
inline

Definition at line 1193 of file message_snapshot.cc.

1193{}

Member Function Documentation

◆ ReadNodes()

void dart::TypedDataMessageDeserializationCluster::ReadNodes ( MessageDeserializer d)
inlinevirtual

Implements dart::MessageDeserializationCluster.

Definition at line 1195 of file message_snapshot.cc.

1195 {
1197 intptr_t count = d->ReadUnsigned();
1198 TypedData& data = TypedData::Handle(d->zone());
1199 for (intptr_t i = 0; i < count; i++) {
1200 intptr_t length = d->ReadUnsigned();
1201 data = TypedData::New(cid_, length);
1202 d->AssignRef(data.ptr());
1203 const intptr_t length_in_bytes = length * element_size;
1204 NoSafepointScope no_safepoint;
1205 d->ReadBytes(data.untag()->data(), length_in_bytes);
1206 }
1207 }
int count
static size_t element_size(Layout layout, SkSLType type)
static Object & Handle()
Definition object.h:407
intptr_t ElementSizeInBytes() const
Definition object.h:11505
static TypedDataPtr New(intptr_t class_id, intptr_t len, Heap::Space space=Heap::kNew)
Definition object.cc:25666
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
Definition main.cc:19
size_t length
static int8_t data[kExtLength]

◆ ReadNodesApi()

void dart::TypedDataMessageDeserializationCluster::ReadNodesApi ( ApiMessageDeserializer d)
inlinevirtual

Reimplemented from dart::MessageDeserializationCluster.

Definition at line 1209 of file message_snapshot.cc.

1209 {
1211 switch (cid_) {
1212 case kTypedDataInt8ArrayCid:
1214 break;
1215 case kTypedDataUint8ArrayCid:
1217 break;
1218 case kTypedDataUint8ClampedArrayCid:
1220 break;
1221 case kTypedDataInt16ArrayCid:
1223 break;
1224 case kTypedDataUint16ArrayCid:
1226 break;
1227 case kTypedDataInt32ArrayCid:
1229 break;
1230 case kTypedDataUint32ArrayCid:
1232 break;
1233 case kTypedDataInt64ArrayCid:
1235 break;
1236 case kTypedDataUint64ArrayCid:
1238 break;
1239 case kTypedDataFloat32ArrayCid:
1241 break;
1242 case kTypedDataFloat64ArrayCid:
1244 break;
1245 case kTypedDataInt32x4ArrayCid:
1247 break;
1248 case kTypedDataFloat32x4ArrayCid:
1250 break;
1251 case kTypedDataFloat64x2ArrayCid:
1253 break;
1254 default:
1255 UNREACHABLE();
1256 }
1257
1259 intptr_t count = d->ReadUnsigned();
1260 for (intptr_t i = 0; i < count; i++) {
1262 intptr_t length = d->ReadUnsigned();
1264 data->value.as_typed_data.length = length;
1265 if (length == 0) {
1266 data->value.as_typed_data.values = nullptr;
1267 } else {
1268 data->value.as_typed_data.values = d->CurrentBufferAddress();
1269 d->Advance(length * element_size);
1270 }
1271 d->AssignRef(data);
1272 }
1273 }
#define UNREACHABLE()
Definition assert.h:248
Dart_TypedData_Type
Definition dart_api.h:2603
@ Dart_TypedData_kFloat32x4
Definition dart_api.h:2617
@ Dart_TypedData_kInt32x4
Definition dart_api.h:2616
@ Dart_TypedData_kUint8
Definition dart_api.h:2606
@ Dart_TypedData_kUint32
Definition dart_api.h:2611
@ Dart_TypedData_kInt32
Definition dart_api.h:2610
@ Dart_TypedData_kUint16
Definition dart_api.h:2609
@ Dart_TypedData_kFloat64x2
Definition dart_api.h:2618
@ Dart_TypedData_kUint64
Definition dart_api.h:2613
@ Dart_TypedData_kFloat32
Definition dart_api.h:2614
@ Dart_TypedData_kInt16
Definition dart_api.h:2608
@ Dart_TypedData_kFloat64
Definition dart_api.h:2615
@ Dart_TypedData_kUint8Clamped
Definition dart_api.h:2607
@ Dart_TypedData_kInt8
Definition dart_api.h:2605
@ Dart_TypedData_kInt64
Definition dart_api.h:2612
@ Dart_CObject_kTypedData
union _Dart_CObject::@86 value
Dart_CObject_Type type
struct _Dart_CObject::@86::@90 as_typed_data

The documentation for this class was generated from the following file: