Flutter Engine
The Flutter Engine
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
sktext::gpu::SubRun Class Referenceabstract

#include <SubRunContainer.h>

Public Types

enum  SubRunStreamTag : int
 

Public Member Functions

virtual ~SubRun ()
 
virtual void draw (SkCanvas *, SkPoint drawOrigin, const SkPaint &, sk_sp< SkRefCnt > subRunStorage, const AtlasDrawDelegate &) const =0
 
void flatten (SkWriteBuffer &buffer) const
 
virtual int unflattenSize () const =0
 
virtual bool canReuse (const SkPaint &paint, const SkMatrix &positionMatrix) const =0
 
virtual const AtlasSubRuntestingOnly_atlasSubRun () const =0
 

Static Public Member Functions

static SubRunOwner MakeFromBuffer (SkReadBuffer &buffer, sktext::gpu::SubRunAllocator *alloc, const SkStrikeClient *client)
 

Protected Member Functions

virtual SubRunStreamTag subRunStreamTag () const =0
 
virtual void doFlatten (SkWriteBuffer &buffer) const =0
 

Friends

class SubRunList
 

Detailed Description

Definition at line 130 of file SubRunContainer.h.

Member Enumeration Documentation

◆ SubRunStreamTag

Definition at line 97 of file SubRunContainer.cpp.

97 : int {
98 kBad = 0, // Make this 0 to line up with errors from readInt.
100#if !defined(SK_DISABLE_SDF_TEXT)
102#endif
107};

Constructor & Destructor Documentation

◆ ~SubRun()

sktext::gpu::SubRun::~SubRun ( )
virtualdefault

Member Function Documentation

◆ canReuse()

virtual bool sktext::gpu::SubRun::canReuse ( const SkPaint paint,
const SkMatrix positionMatrix 
) const
pure virtual

◆ doFlatten()

virtual void sktext::gpu::SubRun::doFlatten ( SkWriteBuffer buffer) const
protectedpure virtual

◆ draw()

virtual void sktext::gpu::SubRun::draw ( SkCanvas ,
SkPoint  drawOrigin,
const SkPaint ,
sk_sp< SkRefCnt subRunStorage,
const AtlasDrawDelegate  
) const
pure virtual

◆ flatten()

void sktext::gpu::SubRun::flatten ( SkWriteBuffer buffer) const

Definition at line 1331 of file SubRunContainer.cpp.

1331 {
1332 buffer.writeInt(this->subRunStreamTag());
1333 this->doFlatten(buffer);
1334}
virtual void doFlatten(SkWriteBuffer &buffer) const =0
virtual SubRunStreamTag subRunStreamTag() const =0
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
Definition: switches.h:126

◆ MakeFromBuffer()

SubRunOwner sktext::gpu::SubRun::MakeFromBuffer ( SkReadBuffer buffer,
sktext::gpu::SubRunAllocator alloc,
const SkStrikeClient client 
)
static

Definition at line 1336 of file SubRunContainer.cpp.

1338 {
1339 using Maker = SubRunOwner (*)(SkReadBuffer&,
1341 const SkStrikeClient*);
1342
1343 static Maker makers[kSubRunStreamTagCount] = {
1344 nullptr, // 0 index is bad.
1345 DirectMaskSubRun::MakeFromBuffer,
1346#if !defined(SK_DISABLE_SDF_TEXT)
1347 SDFTSubRun::MakeFromBuffer,
1348#endif
1349 TransformedMaskSubRun::MakeFromBuffer,
1350 PathSubRun::MakeFromBuffer,
1351 DrawableSubRun::MakeFromBuffer,
1352 };
1353 int subRunTypeInt = buffer.readInt();
1354 SkASSERT(kBad < subRunTypeInt && subRunTypeInt < kSubRunStreamTagCount);
1355 if (!buffer.validate(kBad < subRunTypeInt && subRunTypeInt < kSubRunStreamTagCount)) {
1356 return nullptr;
1357 }
1358 auto maker = makers[subRunTypeInt];
1359 if (!buffer.validate(maker != nullptr)) { return nullptr; }
1360 return maker(buffer, alloc, client);
1361}
#define SkASSERT(cond)
Definition: SkAssert.h:116
std::unique_ptr< SubRun, SubRunAllocator::Destroyer > SubRunOwner

◆ subRunStreamTag()

virtual SubRunStreamTag sktext::gpu::SubRun::subRunStreamTag ( ) const
protectedpure virtual

◆ testingOnly_atlasSubRun()

virtual const AtlasSubRun * sktext::gpu::SubRun::testingOnly_atlasSubRun ( ) const
pure virtual

◆ unflattenSize()

virtual int sktext::gpu::SubRun::unflattenSize ( ) const
pure virtual

Friends And Related Function Documentation

◆ SubRunList

friend class SubRunList
friend

Definition at line 160 of file SubRunContainer.h.


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