Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
GrMockTextureInfo Struct Reference

#include <GrMockTypes.h>

Public Member Functions

 GrMockTextureInfo ()
 
 GrMockTextureInfo (GrColorType colorType, SkTextureCompressionType compressionType, int id, skgpu::Protected isProtected=skgpu::Protected::kNo)
 
bool operator== (const GrMockTextureInfo &that) const
 
GrBackendFormat getBackendFormat () const
 
SkTextureCompressionType compressionType () const
 
GrColorType colorType () const
 
int id () const
 
skgpu::Protected getProtected () const
 
bool isProtected () const
 

Detailed Description

Definition at line 20 of file GrMockTypes.h.

Constructor & Destructor Documentation

◆ GrMockTextureInfo() [1/2]

GrMockTextureInfo::GrMockTextureInfo ( )
inline

Definition at line 21 of file GrMockTypes.h.

22 : fColorType(GrColorType::kUnknown)
23 , fCompressionType(SkTextureCompressionType::kNone)
24 , fID(0) {}

◆ GrMockTextureInfo() [2/2]

GrMockTextureInfo::GrMockTextureInfo ( GrColorType  colorType,
SkTextureCompressionType  compressionType,
int  id,
skgpu::Protected  isProtected = skgpu::Protected::kNo 
)
inline

Definition at line 26 of file GrMockTypes.h.

30 : fColorType(colorType)
31 , fCompressionType(compressionType)
32 , fID(id)
33 , fProtected(isProtected) {
34 SkASSERT(fID);
35 if (fCompressionType != SkTextureCompressionType::kNone) {
37 }
38 }
#define SkASSERT(cond)
Definition: SkAssert.h:116
SkTextureCompressionType compressionType() const
Definition: GrMockTypes.h:49
bool isProtected() const
Definition: GrMockTypes.h:59
GrColorType colorType() const
Definition: GrMockTypes.h:51

Member Function Documentation

◆ colorType()

GrColorType GrMockTextureInfo::colorType ( ) const
inline

Definition at line 51 of file GrMockTypes.h.

51 {
52 SkASSERT(fCompressionType == SkTextureCompressionType::kNone);
53 return fColorType;
54 }

◆ compressionType()

SkTextureCompressionType GrMockTextureInfo::compressionType ( ) const
inline

Definition at line 49 of file GrMockTypes.h.

49{ return fCompressionType; }

◆ getBackendFormat()

GrBackendFormat GrMockTextureInfo::getBackendFormat ( ) const

Definition at line 19 of file GrMockTypes.cpp.

19 {
20 return GrBackendFormat::MakeMock(fColorType, fCompressionType);
21}
static GrBackendFormat MakeMock(GrColorType colorType, SkTextureCompressionType compression, bool isStencilFormat=false)

◆ getProtected()

skgpu::Protected GrMockTextureInfo::getProtected ( ) const
inline

Definition at line 58 of file GrMockTypes.h.

58{ return fProtected; }

◆ id()

int GrMockTextureInfo::id ( ) const
inline

Definition at line 56 of file GrMockTypes.h.

56{ return fID; }

◆ isProtected()

bool GrMockTextureInfo::isProtected ( ) const
inline

Definition at line 59 of file GrMockTypes.h.

59{ return fProtected == skgpu::Protected::kYes; }

◆ operator==()

bool GrMockTextureInfo::operator== ( const GrMockTextureInfo that) const
inline

Definition at line 40 of file GrMockTypes.h.

40 {
41 return fColorType == that.fColorType &&
42 fCompressionType == that.fCompressionType &&
43 fID == that.fID &&
44 fProtected == that.fProtected;
45 }

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