Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
dart::ExternalTypedDataMessageDeserializationCluster Class Reference
Inheritance diagram for dart::ExternalTypedDataMessageDeserializationCluster:
dart::MessageDeserializationCluster dart::ZoneAllocated

Public Member Functions

 ExternalTypedDataMessageDeserializationCluster (intptr_t cid)
 
 ~ExternalTypedDataMessageDeserializationCluster ()
 
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 ReadNodes (MessageDeserializer *d)=0
 
virtual void ReadEdges (MessageDeserializer *d)
 
virtual ObjectPtr PostLoad (MessageDeserializer *d)
 
virtual void ReadNodesApi (ApiMessageDeserializer *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 1349 of file message_snapshot.cc.

Constructor & Destructor Documentation

◆ ExternalTypedDataMessageDeserializationCluster()

dart::ExternalTypedDataMessageDeserializationCluster::ExternalTypedDataMessageDeserializationCluster ( intptr_t  cid)
inlineexplicit

Definition at line 1352 of file message_snapshot.cc.

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

◆ ~ExternalTypedDataMessageDeserializationCluster()

dart::ExternalTypedDataMessageDeserializationCluster::~ExternalTypedDataMessageDeserializationCluster ( )
inline

Definition at line 1354 of file message_snapshot.cc.

1354{}

Member Function Documentation

◆ ReadNodes()

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

Implements dart::MessageDeserializationCluster.

Definition at line 1356 of file message_snapshot.cc.

1356 {
1358 intptr_t count = d->ReadUnsigned();
1359 ExternalTypedData& data = ExternalTypedData::Handle(d->zone());
1360 for (intptr_t i = 0; i < count; i++) {
1361 intptr_t length = d->ReadUnsigned();
1362 FinalizableData finalizable_data = d->finalizable_data()->Take();
1364 cid_, reinterpret_cast<uint8_t*>(finalizable_data.data), length);
1365 intptr_t external_size = length * element_size;
1366 data.AddFinalizer(finalizable_data.peer, finalizable_data.callback,
1367 external_size);
1368 d->AssignRef(data.ptr());
1369 }
1370 }
int count
Definition: FontMgrTest.cpp:50
static size_t element_size(Layout layout, SkSLType type)
static ExternalTypedDataPtr New(intptr_t class_id, uint8_t *data, intptr_t len, Heap::Space space=Heap::kNew, bool perform_eager_msan_initialization_check=true)
Definition: object.cc:25626
static Object & Handle()
Definition: object.h:407
intptr_t ElementSizeInBytes() const
Definition: object.h:11531
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
Definition: main.cc:19
size_t length
static int8_t data[kExtLength]

◆ ReadNodesApi()

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

Reimplemented from dart::MessageDeserializationCluster.

Definition at line 1372 of file message_snapshot.cc.

1372 {
1374 switch (cid_) {
1375 case kExternalTypedDataInt8ArrayCid:
1377 break;
1378 case kExternalTypedDataUint8ArrayCid:
1380 break;
1381 case kExternalTypedDataUint8ClampedArrayCid:
1383 break;
1384 case kExternalTypedDataInt16ArrayCid:
1386 break;
1387 case kExternalTypedDataUint16ArrayCid:
1389 break;
1390 case kExternalTypedDataInt32ArrayCid:
1392 break;
1393 case kExternalTypedDataUint32ArrayCid:
1395 break;
1396 case kExternalTypedDataInt64ArrayCid:
1398 break;
1399 case kExternalTypedDataUint64ArrayCid:
1401 break;
1402 case kExternalTypedDataFloat32ArrayCid:
1404 break;
1405 case kExternalTypedDataFloat64ArrayCid:
1407 break;
1408 case kExternalTypedDataInt32x4ArrayCid:
1410 break;
1411 case kExternalTypedDataFloat32x4ArrayCid:
1413 break;
1414 case kExternalTypedDataFloat64x2ArrayCid:
1416 break;
1417 default:
1418 UNREACHABLE();
1419 }
1420
1421 intptr_t count = d->ReadUnsigned();
1422 for (intptr_t i = 0; i < count; i++) {
1424 intptr_t length = d->ReadUnsigned();
1425 FinalizableData finalizable_data = d->finalizable_data()->Get();
1426 data->value.as_typed_data.type = type;
1427 data->value.as_typed_data.length = length;
1428 data->value.as_typed_data.values =
1429 reinterpret_cast<uint8_t*>(finalizable_data.data);
1430 d->AssignRef(data);
1431 }
1432 }
#define UNREACHABLE()
Definition: assert.h:248
GLenum type
Dart_TypedData_Type
Definition: dart_api.h:2612
@ Dart_TypedData_kFloat32x4
Definition: dart_api.h:2626
@ Dart_TypedData_kInt32x4
Definition: dart_api.h:2625
@ Dart_TypedData_kUint8
Definition: dart_api.h:2615
@ Dart_TypedData_kUint32
Definition: dart_api.h:2620
@ Dart_TypedData_kInt32
Definition: dart_api.h:2619
@ Dart_TypedData_kUint16
Definition: dart_api.h:2618
@ Dart_TypedData_kFloat64x2
Definition: dart_api.h:2627
@ Dart_TypedData_kUint64
Definition: dart_api.h:2622
@ Dart_TypedData_kFloat32
Definition: dart_api.h:2623
@ Dart_TypedData_kInt16
Definition: dart_api.h:2617
@ Dart_TypedData_kFloat64
Definition: dart_api.h:2624
@ Dart_TypedData_kUint8Clamped
Definition: dart_api.h:2616
@ Dart_TypedData_kInt8
Definition: dart_api.h:2614
@ Dart_TypedData_kInt64
Definition: dart_api.h:2621
@ Dart_CObject_kTypedData

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