Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
skgpu::graphite::MtlTextureSpec Struct Reference

#include <MtlGraphiteTypesPriv.h>

Public Member Functions

 MtlTextureSpec ()
 
 MtlTextureSpec (const MtlTextureInfo &info)
 
bool operator== (const MtlTextureSpec &that) const
 
bool isCompatible (const MtlTextureSpec &that) const
 
SkString toString () const
 

Public Attributes

MtlPixelFormat fFormat
 
MtlTextureUsage fUsage
 
MtlStorageMode fStorageMode
 
bool fFramebufferOnly
 

Detailed Description

Definition at line 48 of file MtlGraphiteTypesPriv.h.

Constructor & Destructor Documentation

◆ MtlTextureSpec() [1/2]

skgpu::graphite::MtlTextureSpec::MtlTextureSpec ( )
inline

◆ MtlTextureSpec() [2/2]

skgpu::graphite::MtlTextureSpec::MtlTextureSpec ( const MtlTextureInfo info)
inline

Definition at line 54 of file MtlGraphiteTypesPriv.h.

55 : fFormat(info.fFormat)
56 , fUsage(info.fUsage)
57 , fStorageMode(info.fStorageMode)
58 , fFramebufferOnly(info.fFramebufferOnly) {}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition: DM.cpp:213

Member Function Documentation

◆ isCompatible()

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

Definition at line 67 of file MtlGraphiteTypesPriv.h.

67 {
68 // The usages may match or the usage passed in may be a superset of the usage stored within.
69 return fFormat == that.fFormat &&
70 fStorageMode == that.fStorageMode &&
71 fFramebufferOnly == that.fFramebufferOnly &&
72 (fUsage & that.fUsage) == fUsage;
73 }

◆ operator==()

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

Definition at line 60 of file MtlGraphiteTypesPriv.h.

60 {
61 return fFormat == that.fFormat &&
62 fUsage == that.fUsage &&
63 fStorageMode == that.fStorageMode &&
64 fFramebufferOnly == that.fFramebufferOnly;
65 }

◆ toString()

SkString skgpu::graphite::MtlTextureSpec::toString ( ) const
inline

Definition at line 75 of file MtlGraphiteTypesPriv.h.

75 {
76 return SkStringPrintf("format=%u,usage=0x%04X,storageMode=%u,framebufferOnly=%d",
77 fFormat,
78 fUsage,
81 }
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

◆ fFormat

MtlPixelFormat skgpu::graphite::MtlTextureSpec::fFormat

Definition at line 83 of file MtlGraphiteTypesPriv.h.

◆ fFramebufferOnly

bool skgpu::graphite::MtlTextureSpec::fFramebufferOnly

Definition at line 86 of file MtlGraphiteTypesPriv.h.

◆ fStorageMode

MtlStorageMode skgpu::graphite::MtlTextureSpec::fStorageMode

Definition at line 85 of file MtlGraphiteTypesPriv.h.

◆ fUsage

MtlTextureUsage skgpu::graphite::MtlTextureSpec::fUsage

Definition at line 84 of file MtlGraphiteTypesPriv.h.


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