Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
skgpu::graphite::DawnTextureSpec Struct Reference

#include <DawnTypesPriv.h>

Public Member Functions

 DawnTextureSpec ()=default
 
 DawnTextureSpec (const DawnTextureInfo &info)
 
bool operator== (const DawnTextureSpec &that) const
 
bool isCompatible (const DawnTextureSpec &that) const
 
wgpu::TextureFormat getViewFormat () const
 
SkString toString () const
 

Public Attributes

wgpu::TextureFormat fFormat = wgpu::TextureFormat::Undefined
 
wgpu::TextureFormat fViewFormat = wgpu::TextureFormat::Undefined
 
wgpu::TextureUsage fUsage = wgpu::TextureUsage::None
 
wgpu::TextureAspect fAspect = wgpu::TextureAspect::All
 
uint32_t fSlice = 0
 

Detailed Description

Definition at line 16 of file DawnTypesPriv.h.

Constructor & Destructor Documentation

◆ DawnTextureSpec() [1/2]

skgpu::graphite::DawnTextureSpec::DawnTextureSpec ( )
default

◆ DawnTextureSpec() [2/2]

skgpu::graphite::DawnTextureSpec::DawnTextureSpec ( const DawnTextureInfo info)
inline

Definition at line 18 of file DawnTypesPriv.h.

19 : fFormat(info.fFormat)
20 , fViewFormat(info.fViewFormat)
21 , fUsage(info.fUsage)
22 , fAspect(info.fAspect)
23 , fSlice(info.fSlice) {}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition DM.cpp:213
wgpu::TextureFormat fViewFormat

Member Function Documentation

◆ getViewFormat()

wgpu::TextureFormat skgpu::graphite::DawnTextureSpec::getViewFormat ( ) const
inline

Definition at line 38 of file DawnTypesPriv.h.

38 {
39 return fViewFormat != wgpu::TextureFormat::Undefined ? fViewFormat : fFormat;
40 }

◆ isCompatible()

bool skgpu::graphite::DawnTextureSpec::isCompatible ( const DawnTextureSpec that) const
inline

Definition at line 31 of file DawnTypesPriv.h.

31 {
32 // The usages may match or the usage passed in may be a superset of the usage stored within.
33 // The aspect should either match the plane aspect or should be All.
34 return getViewFormat() == that.getViewFormat() && (fUsage & that.fUsage) == fUsage &&
35 (fAspect == that.fAspect || fAspect == wgpu::TextureAspect::All);
36 }
wgpu::TextureFormat getViewFormat() const

◆ operator==()

bool skgpu::graphite::DawnTextureSpec::operator== ( const DawnTextureSpec that) const
inline

Definition at line 25 of file DawnTypesPriv.h.

25 {
26 return fUsage == that.fUsage && fFormat == that.fFormat &&
27 fViewFormat == that.fViewFormat && fAspect == that.fAspect &&
28 fSlice == that.fSlice;
29 }

◆ toString()

SkString skgpu::graphite::DawnTextureSpec::toString ( ) const

Definition at line 12 of file DawnTypesPriv.cpp.

12 {
13 return SkStringPrintf("format=0x%08X,viewFormat=0x%08X,usage=0x%08X,aspect=0x%08X,slice=%u",
14 static_cast<unsigned int>(fFormat),
15 static_cast<unsigned int>(fViewFormat),
16 static_cast<unsigned int>(fUsage),
17 static_cast<unsigned int>(fAspect),
18 fSlice);
19}
SK_API SkString static SkString SkStringPrintf()
Definition SkString.h:287

Member Data Documentation

◆ fAspect

wgpu::TextureAspect skgpu::graphite::DawnTextureSpec::fAspect = wgpu::TextureAspect::All

Definition at line 49 of file DawnTypesPriv.h.

◆ fFormat

wgpu::TextureFormat skgpu::graphite::DawnTextureSpec::fFormat = wgpu::TextureFormat::Undefined

Definition at line 44 of file DawnTypesPriv.h.

◆ fSlice

uint32_t skgpu::graphite::DawnTextureSpec::fSlice = 0

Definition at line 50 of file DawnTypesPriv.h.

◆ fUsage

wgpu::TextureUsage skgpu::graphite::DawnTextureSpec::fUsage = wgpu::TextureUsage::None

Definition at line 48 of file DawnTypesPriv.h.

◆ fViewFormat

wgpu::TextureFormat skgpu::graphite::DawnTextureSpec::fViewFormat = wgpu::TextureFormat::Undefined

Definition at line 47 of file DawnTypesPriv.h.


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