Flutter Engine
The Flutter Engine
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
 
wgpu::YCbCrVkDescriptor fYcbcrVkDescriptor = {}
 
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#if !defined(__EMSCRIPTEN__)
24 , fYcbcrVkDescriptor(info.fYcbcrVkDescriptor)
25#endif
26 , fSlice(info.fSlice) {
27 }
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition: DM.cpp:213
wgpu::YCbCrVkDescriptor fYcbcrVkDescriptor
Definition: DawnTypesPriv.h:62
wgpu::TextureFormat fViewFormat
Definition: DawnTypesPriv.h:58

Member Function Documentation

◆ getViewFormat()

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

Definition at line 49 of file DawnTypesPriv.h.

49 {
50 return fViewFormat != wgpu::TextureFormat::Undefined ? fViewFormat : fFormat;
51 }

◆ isCompatible()

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

Definition at line 38 of file DawnTypesPriv.h.

38 {
39 // The usages may match or the usage passed in may be a superset of the usage stored within.
40 // The YCbCrInfo must be equal.
41 // The aspect should either match the plane aspect or should be All.
42 return getViewFormat() == that.getViewFormat() && (fUsage & that.fUsage) == fUsage &&
43#if !defined(__EMSCRIPTEN__)
44 IsEqualToYCbCrVkDescriptorField(that.fYcbcrVkDescriptor) &&
45#endif
46 (fAspect == that.fAspect || fAspect == wgpu::TextureAspect::All);
47 }
wgpu::TextureFormat getViewFormat() const
Definition: DawnTypesPriv.h:49

◆ operator==()

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

Definition at line 29 of file DawnTypesPriv.h.

29 {
30 return fUsage == that.fUsage && fFormat == that.fFormat &&
31 fViewFormat == that.fViewFormat && fAspect == that.fAspect &&
32#if !defined(__EMSCRIPTEN__)
33 IsEqualToYCbCrVkDescriptorField(that.fYcbcrVkDescriptor) &&
34#endif
35 fSlice == that.fSlice;
36 }

◆ 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 SkStringPrintf(const char *format,...) SK_PRINTF_LIKE(1
Creates a new string and writes into it using a printf()-style format.

Member Data Documentation

◆ fAspect

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

Definition at line 60 of file DawnTypesPriv.h.

◆ fFormat

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

Definition at line 55 of file DawnTypesPriv.h.

◆ fSlice

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

Definition at line 64 of file DawnTypesPriv.h.

◆ fUsage

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

Definition at line 59 of file DawnTypesPriv.h.

◆ fViewFormat

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

Definition at line 58 of file DawnTypesPriv.h.

◆ fYcbcrVkDescriptor

wgpu::YCbCrVkDescriptor skgpu::graphite::DawnTextureSpec::fYcbcrVkDescriptor = {}

Definition at line 62 of file DawnTypesPriv.h.


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