Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
GrImageInfo Class Reference

#include <GrImageInfo.h>

Public Member Functions

 GrImageInfo ()
 
 GrImageInfo (const SkImageInfo &info)
 
 GrImageInfo (GrColorType ct, SkAlphaType at, sk_sp< SkColorSpace > cs, int w, int h)
 
 GrImageInfo (GrColorType ct, SkAlphaType at, sk_sp< SkColorSpace > cs, const SkISize &dimensions)
 
 GrImageInfo (const GrColorInfo &info, const SkISize &dimensions)
 
 GrImageInfo (GrColorInfo &&info, const SkISize &dimensions)
 
 GrImageInfo (const GrImageInfo &)
 
 GrImageInfo (GrImageInfo &&)
 
GrImageInfooperator= (const GrImageInfo &)
 
GrImageInfooperator= (GrImageInfo &&)
 
GrImageInfo makeColorType (GrColorType ct) const
 
GrImageInfo makeAlphaType (SkAlphaType at) const
 
GrImageInfo makeColorSpace (sk_sp< SkColorSpace > cs) const
 
GrImageInfo makeDimensions (SkISize dimensions) const
 
GrImageInfo makeWH (int width, int height) const
 
const GrColorInfocolorInfo () const
 
GrColorType colorType () const
 
SkAlphaType alphaType () const
 
SkColorSpacecolorSpace () const
 
sk_sp< SkColorSpacerefColorSpace () const
 
SkISize dimensions () const
 
int width () const
 
int height () const
 
size_t bpp () const
 
size_t minRowBytes () const
 
bool isValid () const
 

Detailed Description

Definition at line 22 of file GrImageInfo.h.

Constructor & Destructor Documentation

◆ GrImageInfo() [1/8]

GrImageInfo::GrImageInfo ( )
default

◆ GrImageInfo() [2/8]

GrImageInfo::GrImageInfo ( const SkImageInfo info)

Definition at line 17 of file GrImageInfo.cpp.

18 : fColorInfo(info.colorInfo()), fDimensions(info.dimensions()) {}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition: DM.cpp:213

◆ GrImageInfo() [3/8]

GrImageInfo::GrImageInfo ( GrColorType  ct,
SkAlphaType  at,
sk_sp< SkColorSpace cs,
int  w,
int  h 
)

Definition at line 20 of file GrImageInfo.cpp.

21 : fColorInfo(ct, at, std::move(cs)), fDimensions{w,h} {}
SkScalar w
SkScalar h

◆ GrImageInfo() [4/8]

GrImageInfo::GrImageInfo ( GrColorType  ct,
SkAlphaType  at,
sk_sp< SkColorSpace cs,
const SkISize dimensions 
)

Definition at line 23 of file GrImageInfo.cpp.

25 : fColorInfo(ct, at, std::move(cs)), fDimensions(dimensions) {}
SkISize dimensions() const
Definition: GrImageInfo.h:52

◆ GrImageInfo() [5/8]

GrImageInfo::GrImageInfo ( const GrColorInfo info,
const SkISize dimensions 
)

Definition at line 27 of file GrImageInfo.cpp.

28 : fColorInfo(info), fDimensions(dimensions) {}

◆ GrImageInfo() [6/8]

GrImageInfo::GrImageInfo ( GrColorInfo &&  info,
const SkISize dimensions 
)

Definition at line 30 of file GrImageInfo.cpp.

31 : fColorInfo(std::move(info)), fDimensions(dimensions) {}

◆ GrImageInfo() [7/8]

GrImageInfo::GrImageInfo ( const GrImageInfo )
default

◆ GrImageInfo() [8/8]

GrImageInfo::GrImageInfo ( GrImageInfo &&  )
default

Member Function Documentation

◆ alphaType()

SkAlphaType GrImageInfo::alphaType ( ) const
inline

Definition at line 46 of file GrImageInfo.h.

46{ return fColorInfo.alphaType(); }
SkAlphaType alphaType() const
Definition: GrColorInfo.h:44

◆ bpp()

size_t GrImageInfo::bpp ( ) const
inline

Definition at line 58 of file GrImageInfo.h.

58{ return GrColorTypeBytesPerPixel(this->colorType()); }
static constexpr size_t GrColorTypeBytesPerPixel(GrColorType ct)
Definition: GrTypesPriv.h:896
GrColorType colorType() const
Definition: GrImageInfo.h:44

◆ colorInfo()

const GrColorInfo & GrImageInfo::colorInfo ( ) const
inline

Definition at line 42 of file GrImageInfo.h.

42{ return fColorInfo; }

◆ colorSpace()

SkColorSpace * GrImageInfo::colorSpace ( ) const
inline

Definition at line 48 of file GrImageInfo.h.

48{ return fColorInfo.colorSpace(); }
SkColorSpace * colorSpace() const
Definition: GrColorInfo.cpp:48

◆ colorType()

GrColorType GrImageInfo::colorType ( ) const
inline

Definition at line 44 of file GrImageInfo.h.

44{ return fColorInfo.colorType(); }
GrColorType colorType() const
Definition: GrColorInfo.h:43

◆ dimensions()

SkISize GrImageInfo::dimensions ( ) const
inline

Definition at line 52 of file GrImageInfo.h.

52{ return fDimensions; }

◆ height()

int GrImageInfo::height ( ) const
inline

Definition at line 56 of file GrImageInfo.h.

56{ return fDimensions.height(); }
constexpr int32_t height() const
Definition: SkSize.h:37

◆ isValid()

bool GrImageInfo::isValid ( ) const
inline

Definition at line 62 of file GrImageInfo.h.

62{ return fColorInfo.isValid() && this->width() > 0 && this->height() > 0; }
bool isValid() const
Definition: GrColorInfo.h:48
int width() const
Definition: GrImageInfo.h:54
int height() const
Definition: GrImageInfo.h:56

◆ makeAlphaType()

GrImageInfo GrImageInfo::makeAlphaType ( SkAlphaType  at) const

Definition at line 42 of file GrImageInfo.cpp.

42 {
43 return {this->colorType(), at, this->refColorSpace(), this->width(), this->height()};
44}
sk_sp< SkColorSpace > refColorSpace() const
Definition: GrImageInfo.cpp:58

◆ makeColorSpace()

GrImageInfo GrImageInfo::makeColorSpace ( sk_sp< SkColorSpace cs) const

Definition at line 46 of file GrImageInfo.cpp.

46 {
47 return {this->colorType(), this->alphaType(), std::move(cs), this->width(), this->height()};
48}
SkAlphaType alphaType() const
Definition: GrImageInfo.h:46

◆ makeColorType()

GrImageInfo GrImageInfo::makeColorType ( GrColorType  ct) const

Definition at line 38 of file GrImageInfo.cpp.

38 {
39 return {this->colorInfo().makeColorType(ct), this->dimensions()};
40}
GrColorInfo makeColorType(GrColorType ct) const
Definition: GrColorInfo.cpp:40
const GrColorInfo & colorInfo() const
Definition: GrImageInfo.h:42

◆ makeDimensions()

GrImageInfo GrImageInfo::makeDimensions ( SkISize  dimensions) const

Definition at line 50 of file GrImageInfo.cpp.

50 {
51 return {this->colorType(), this->alphaType(), this->refColorSpace(), dimensions};
52}

◆ makeWH()

GrImageInfo GrImageInfo::makeWH ( int  width,
int  height 
) const

Definition at line 54 of file GrImageInfo.cpp.

54 {
55 return {this->colorType(), this->alphaType(), this->refColorSpace(), width, height};
56}

◆ minRowBytes()

size_t GrImageInfo::minRowBytes ( ) const
inline

Definition at line 60 of file GrImageInfo.h.

60{ return this->bpp() * this->width(); }
size_t bpp() const
Definition: GrImageInfo.h:58

◆ operator=() [1/2]

GrImageInfo & GrImageInfo::operator= ( const GrImageInfo )
default

◆ operator=() [2/2]

GrImageInfo & GrImageInfo::operator= ( GrImageInfo &&  )
default

◆ refColorSpace()

sk_sp< SkColorSpace > GrImageInfo::refColorSpace ( ) const

Definition at line 58 of file GrImageInfo.cpp.

58{ return fColorInfo.refColorSpace(); }
sk_sp< SkColorSpace > refColorSpace() const
Definition: GrColorInfo.cpp:49

◆ width()

int GrImageInfo::width ( ) const
inline

Definition at line 54 of file GrImageInfo.h.

54{ return fDimensions.width(); }
constexpr int32_t width() const
Definition: SkSize.h:36

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