Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
skgpu::PlotLocator Class Reference

#include <AtlasTypes.h>

Public Member Functions

 PlotLocator (uint32_t pageIdx, uint32_t plotIdx, uint64_t generation)
 
 PlotLocator ()
 
bool isValid () const
 
void makeInvalid ()
 
bool operator== (const PlotLocator &other) const
 
uint32_t pageIndex () const
 
uint32_t plotIndex () const
 
uint64_t genID () const
 

Static Public Attributes

static constexpr auto kMaxMultitexturePages = 4
 
static constexpr int kMaxPlots = 32
 

Detailed Description

A PlotLocator specifies the plot and is analogous to a directory path: page/plot/plotGeneration

In fact PlotLocator is a portion of a glyph image location in the atlas fully specified by: format/atlasGeneration/page/plot/plotGeneration/rect

Definition at line 239 of file AtlasTypes.h.

Constructor & Destructor Documentation

◆ PlotLocator() [1/2]

skgpu::PlotLocator::PlotLocator ( uint32_t  pageIdx,
uint32_t  plotIdx,
uint64_t  generation 
)
inline

Definition at line 248 of file AtlasTypes.h.

249 : fGenID(generation)
250 , fPlotIndex(plotIdx)
251 , fPageIndex(pageIdx) {
253 SkASSERT(plotIdx < kMaxPlots);
254 SkASSERT(generation < ((uint64_t)1 << 48));
255 }
#define SkASSERT(cond)
Definition SkAssert.h:116
static constexpr auto kMaxMultitexturePages
Definition AtlasTypes.h:245
static constexpr int kMaxPlots
Definition AtlasTypes.h:246

◆ PlotLocator() [2/2]

skgpu::PlotLocator::PlotLocator ( )
inline

Definition at line 257 of file AtlasTypes.h.

259 , fPlotIndex(0)
260 , fPageIndex(0) {}
static constexpr uint64_t kInvalidGeneration
Definition AtlasTypes.h:139

Member Function Documentation

◆ genID()

uint64_t skgpu::PlotLocator::genID ( ) const
inline

Definition at line 280 of file AtlasTypes.h.

280{ return fGenID; }

◆ isValid()

bool skgpu::PlotLocator::isValid ( ) const
inline

Definition at line 262 of file AtlasTypes.h.

262 {
264 fPlotIndex != 0 || fPageIndex != 0;
265 }

◆ makeInvalid()

void skgpu::PlotLocator::makeInvalid ( )
inline

Definition at line 267 of file AtlasTypes.h.

267 {
269 fPlotIndex = 0;
270 fPageIndex = 0;
271 }

◆ operator==()

bool skgpu::PlotLocator::operator== ( const PlotLocator other) const
inline

Definition at line 273 of file AtlasTypes.h.

273 {
274 return fGenID == other.fGenID &&
275 fPlotIndex == other.fPlotIndex &&
276 fPageIndex == other.fPageIndex; }

◆ pageIndex()

uint32_t skgpu::PlotLocator::pageIndex ( ) const
inline

Definition at line 278 of file AtlasTypes.h.

278{ return fPageIndex; }

◆ plotIndex()

uint32_t skgpu::PlotLocator::plotIndex ( ) const
inline

Definition at line 279 of file AtlasTypes.h.

279{ return fPlotIndex; }

Member Data Documentation

◆ kMaxMultitexturePages

constexpr auto skgpu::PlotLocator::kMaxMultitexturePages = 4
inlinestaticconstexpr

Definition at line 245 of file AtlasTypes.h.

◆ kMaxPlots

constexpr int skgpu::PlotLocator::kMaxPlots = 32
inlinestaticconstexpr

Definition at line 246 of file AtlasTypes.h.


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