Flutter Engine
The Flutter Engine
Public Types | Static Public Member Functions | List of all members
SkMeshSpecificationPriv Struct Reference

#include <SkMeshPriv.h>

Public Types

using Varying = SkMeshSpecification::Varying
 
using Attribute = SkMeshSpecification::Attribute
 
using ColorType = SkMeshSpecification::ColorType
 

Static Public Member Functions

static SkSpan< const VaryingVaryings (const SkMeshSpecification &spec)
 
static const SkSL::ProgramVS (const SkMeshSpecification &spec)
 
static const SkSL::ProgramFS (const SkMeshSpecification &spec)
 
static int Hash (const SkMeshSpecification &spec)
 
static ColorType GetColorType (const SkMeshSpecification &spec)
 
static bool HasColors (const SkMeshSpecification &spec)
 
static SkColorSpaceColorSpace (const SkMeshSpecification &spec)
 
static SkAlphaType AlphaType (const SkMeshSpecification &spec)
 
static SkSLType VaryingTypeAsSLType (Varying::Type type)
 
static SkSLType AttrTypeAsSLType (Attribute::Type type)
 
static int PassthroughLocalCoordsVaryingIndex (const SkMeshSpecification &spec)
 
static bool VaryingIsDead (const SkMeshSpecification &spec, int v)
 

Detailed Description

Definition at line 15 of file SkMeshPriv.h.

Member Typedef Documentation

◆ Attribute

Definition at line 17 of file SkMeshPriv.h.

◆ ColorType

using SkMeshSpecificationPriv::ColorType = SkMeshSpecification::ColorType

Definition at line 18 of file SkMeshPriv.h.

◆ Varying

Definition at line 16 of file SkMeshPriv.h.

Member Function Documentation

◆ AlphaType()

static SkAlphaType SkMeshSpecificationPriv::AlphaType ( const SkMeshSpecification spec)
inlinestatic

Definition at line 38 of file SkMeshPriv.h.

38{ return spec.fAlphaType; }

◆ AttrTypeAsSLType()

static SkSLType SkMeshSpecificationPriv::AttrTypeAsSLType ( Attribute::Type  type)
inlinestatic

◆ ColorSpace()

static SkColorSpace * SkMeshSpecificationPriv::ColorSpace ( const SkMeshSpecification spec)
inlinestatic

Definition at line 34 of file SkMeshPriv.h.

34 {
35 return spec.fColorSpace.get();
36 }
T * get() const
Definition: SkRefCnt.h:303

◆ FS()

static const SkSL::Program * SkMeshSpecificationPriv::FS ( const SkMeshSpecification spec)
inlinestatic

Definition at line 25 of file SkMeshPriv.h.

25{ return spec.fFS.get(); }

◆ GetColorType()

static ColorType SkMeshSpecificationPriv::GetColorType ( const SkMeshSpecification spec)
inlinestatic

Definition at line 29 of file SkMeshPriv.h.

29{ return spec.fColorType; }

◆ HasColors()

static bool SkMeshSpecificationPriv::HasColors ( const SkMeshSpecification spec)
inlinestatic

Definition at line 30 of file SkMeshPriv.h.

30 {
31 return GetColorType(spec) != ColorType::kNone;
32 }
static ColorType GetColorType(const SkMeshSpecification &spec)
Definition: SkMeshPriv.h:29

◆ Hash()

static int SkMeshSpecificationPriv::Hash ( const SkMeshSpecification spec)
inlinestatic

Definition at line 27 of file SkMeshPriv.h.

27{ return spec.fHash; }

◆ PassthroughLocalCoordsVaryingIndex()

static int SkMeshSpecificationPriv::PassthroughLocalCoordsVaryingIndex ( const SkMeshSpecification spec)
inlinestatic

Definition at line 65 of file SkMeshPriv.h.

65 {
66 return spec.fPassthroughLocalCoordsVaryingIndex;
67 }

◆ VaryingIsDead()

static bool SkMeshSpecificationPriv::VaryingIsDead ( const SkMeshSpecification spec,
int  v 
)
inlinestatic

A varying is dead if it is never referenced OR it is only referenced as a passthrough for local coordinates. In the latter case, its index will returned as PassthroughLocalCoordsVaryingIndex. Our analysis is not very sophisticated so this is determined conservatively.

Definition at line 75 of file SkMeshPriv.h.

75 {
76 SkASSERT(v >= 0 && SkToSizeT(v) < spec.fVaryings.size());
77 return (1 << v) & spec.fDeadVaryingMask;
78 }
#define SkASSERT(cond)
Definition: SkAssert.h:116
constexpr size_t SkToSizeT(S x)
Definition: SkTo.h:31

◆ Varyings()

static SkSpan< const Varying > SkMeshSpecificationPriv::Varyings ( const SkMeshSpecification spec)
inlinestatic

Definition at line 20 of file SkMeshPriv.h.

20 {
21 return SkSpan(spec.fVaryings);
22 }
SkSpan(Container &&) -> SkSpan< std::remove_pointer_t< decltype(std::data(std::declval< Container >()))> >

◆ VaryingTypeAsSLType()

static SkSLType SkMeshSpecificationPriv::VaryingTypeAsSLType ( Varying::Type  type)
inlinestatic

◆ VS()

static const SkSL::Program * SkMeshSpecificationPriv::VS ( const SkMeshSpecification spec)
inlinestatic

Definition at line 24 of file SkMeshPriv.h.

24{ return spec.fVS.get(); }

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