Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
GrMtlCppUtil.h File Reference
#include "include/gpu/ganesh/mtl/GrMtlTypes.h"
#include "include/private/gpu/ganesh/GrTypesPriv.h"

Go to the source code of this file.

Functions

GrMTLPixelFormat GrGetMTLPixelFormatFromMtlTextureInfo (const GrMtlTextureInfo &)
 
int GrMtlTextureInfoSampleCount (const GrMtlTextureInfo &)
 

Function Documentation

◆ GrGetMTLPixelFormatFromMtlTextureInfo()

GrMTLPixelFormat GrGetMTLPixelFormatFromMtlTextureInfo ( const GrMtlTextureInfo &  info)

Definition at line 228 of file GrMtlUtil.mm.

228 {
229 id<MTLTexture> GR_NORETAIN mtlTexture = GrGetMTLTexture(info.fTexture.get());
230 return static_cast<GrMTLPixelFormat>(mtlTexture.pixelFormat);
231}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition DM.cpp:213
unsigned int GrMTLPixelFormat
Definition GrMtlTypes.h:17
GR_NORETAIN_BEGIN SK_ALWAYS_INLINE id< MTLTexture > GrGetMTLTexture(const void *mtlTexture)
Definition GrMtlUtil.h:36

◆ GrMtlTextureInfoSampleCount()

int GrMtlTextureInfoSampleCount ( const GrMtlTextureInfo &  info)

Gets the sample count of a texture held by GrMtlTextureInfo or zero if the texture is nil.

Definition at line 294 of file GrMtlUtil.mm.

294 {
295 id<MTLTexture> texture = GrGetMTLTexture(info.fTexture.get());
296 if (!texture) {
297 return 0;
298 }
299 return texture.sampleCount;
300}
FlTexture * texture