Flutter Engine
The Flutter Engine
Public Member Functions | Friends | List of all members
skgpu::IndexWriter Struct Reference

#include <BufferWriter.h>

Inheritance diagram for skgpu::IndexWriter:
skgpu::BufferWriter

Public Member Functions

 IndexWriter ()=default
 
 IndexWriter (void *ptr, size_t size)
 
 IndexWriter (void *ptr, Mark end)
 
 IndexWriter (const IndexWriter &)=delete
 
 IndexWriter (IndexWriter &&that)
 
IndexWriteroperator= (const IndexWriter &)=delete
 
IndexWriteroperator= (IndexWriter &&that)
 
IndexWriter makeOffset (int numIndices) const
 
void writeArray (const uint16_t *array, int count)
 
- Public Member Functions inherited from skgpu::BufferWriter
 operator bool () const
 
Mark mark (size_t offset=0) const
 

Friends

IndexWriteroperator<< (IndexWriter &w, uint16_t val)
 

Additional Inherited Members

- Protected Member Functions inherited from skgpu::BufferWriter
 BufferWriter ()=default
 
 BufferWriter (void *ptr, size_t size)
 
 BufferWriter (void *ptr, Mark end={})
 
BufferWriteroperator= (const BufferWriter &)=delete
 
BufferWriteroperator= (BufferWriter &&that)
 
template<typename W >
W makeOffset (size_t offsetInBytes) const
 
void validate (size_t bytesToWrite) const
 
- Protected Attributes inherited from skgpu::BufferWriter
void * fPtr = nullptr
 

Detailed Description

Definition at line 380 of file BufferWriter.h.

Constructor & Destructor Documentation

◆ IndexWriter() [1/5]

skgpu::IndexWriter::IndexWriter ( )
default

◆ IndexWriter() [2/5]

skgpu::IndexWriter::IndexWriter ( void *  ptr,
size_t  size 
)
inline

Definition at line 383 of file BufferWriter.h.

383: BufferWriter(ptr, size) {}
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259
BufferWriter()=default

◆ IndexWriter() [3/5]

skgpu::IndexWriter::IndexWriter ( void *  ptr,
Mark  end 
)
inline

Definition at line 384 of file BufferWriter.h.

384: BufferWriter(ptr, end) {}

◆ IndexWriter() [4/5]

skgpu::IndexWriter::IndexWriter ( const IndexWriter )
delete

◆ IndexWriter() [5/5]

skgpu::IndexWriter::IndexWriter ( IndexWriter &&  that)
inline

Definition at line 387 of file BufferWriter.h.

387{ *this = std::move(that); }

Member Function Documentation

◆ makeOffset()

IndexWriter skgpu::IndexWriter::makeOffset ( int  numIndices) const
inline

Definition at line 395 of file BufferWriter.h.

395 {
396 return this->BufferWriter::makeOffset<IndexWriter>(numIndices * sizeof(uint16_t));
397 }

◆ operator=() [1/2]

IndexWriter & skgpu::IndexWriter::operator= ( const IndexWriter )
delete

◆ operator=() [2/2]

IndexWriter & skgpu::IndexWriter::operator= ( IndexWriter &&  that)
inline

Definition at line 390 of file BufferWriter.h.

390 {
391 BufferWriter::operator=(std::move(that));
392 return *this;
393 }
BufferWriter & operator=(const BufferWriter &)=delete

◆ writeArray()

void skgpu::IndexWriter::writeArray ( const uint16_t *  array,
int  count 
)
inline

Definition at line 399 of file BufferWriter.h.

399 {
400 size_t arraySize = count * sizeof(uint16_t);
401 this->validate(arraySize);
402 memcpy(fPtr, array, arraySize);
403 fPtr = SkTAddOffset<void>(fPtr, arraySize);
404
405 }
int count
Definition: FontMgrTest.cpp:50
void validate(size_t bytesToWrite) const
Definition: BufferWriter.h:102

Friends And Related Function Documentation

◆ operator<<

IndexWriter & operator<< ( IndexWriter w,
uint16_t  val 
)
friend

Definition at line 410 of file BufferWriter.h.

410 {
411 w.validate(sizeof(uint16_t));
412 memcpy(w.fPtr, &val, sizeof(uint16_t));
413 w = w.makeOffset(1);
414 return w;
415}
SkScalar w

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