#include <GrBackendSurface.h>
Definition at line 44 of file GrBackendSurface.h.
◆ GrBackendFormat() [1/2]
GrBackendFormat::GrBackendFormat |
( |
| ) |
|
◆ GrBackendFormat() [2/2]
Definition at line 30 of file GrBackendSurface.cpp.
31 : fBackend(that.fBackend)
32 , fValid(that.fValid)
33 , fTextureType(that.fTextureType) {
34 if (!fValid) {
35 return;
36 }
37
38 switch (fBackend) {
43 that.fFormatData->
copyTo(fFormatData);
44 break;
45#ifdef SK_DIRECT3D
47 fDxgiFormat = that.fDxgiFormat;
48 break;
49#endif
52 break;
53 default:
55 }
56}
#define SK_ABORT(message,...)
◆ ~GrBackendFormat()
GrBackendFormat::~GrBackendFormat |
( |
| ) |
|
|
default |
◆ asMockColorType()
If the backend API is not Mock these three calls will return kUnknown, kNone or false, respectively. Otherwise, only one of the following can be true. The GrColorType is not kUnknown, the compression type is not kNone, or this is a mock stencil format.
Definition at line 152 of file GrBackendSurface.cpp.
152 {
155 return fMock.fColorType;
156 }
157
159}
◆ asMockCompressionType()
◆ backend()
◆ channelMask()
uint32_t GrBackendFormat::channelMask |
( |
| ) |
const |
Gets the channels present in the format as a bitfield of SkColorChannelFlag values. Luminance channels are reported as kGray_SkColorChannelFlag.
Definition at line 94 of file GrBackendSurface.cpp.
94 {
96 return 0;
97 }
98 switch (fBackend) {
103#ifdef SK_DIRECT3D
106#endif
109
110 default:
111 return 0;
112 }
113}
static constexpr uint32_t GrDxgiFormatChannels(DXGI_FORMAT format)
static constexpr uint32_t GrColorTypeChannelFlags(GrColorType ct)
◆ desc()
Definition at line 115 of file GrBackendSurface.cpp.
115 {
118 }
119 switch (fBackend) {
123 return fFormatData->
desc();
124#ifdef SK_DIRECT3D
127#endif
130
131 default:
133 }
134}
static constexpr GrColorFormatDesc GrDxgiFormatDesc(DXGI_FORMAT format)
static constexpr GrColorFormatDesc GrGetColorTypeDesc(GrColorType ct)
◆ isMockStencilFormat()
bool GrBackendFormat::isMockStencilFormat |
( |
| ) |
const |
◆ isValid()
bool GrBackendFormat::isValid |
( |
| ) |
const |
|
inline |
◆ MakeMock()
Definition at line 189 of file GrBackendSurface.cpp.
191 {
193}
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
◆ makeTexture2D()
Definition at line 179 of file GrBackendSurface.cpp.
179 {
181
183 copy.fFormatData->makeTexture2D();
184 }
187}
static void copy(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
◆ operator!=()
◆ operator=()
◆ operator==()
Definition at line 195 of file GrBackendSurface.cpp.
195 {
196
197 if (!fValid || !that.fValid) {
198 return false;
199 }
200
201 if (fBackend != that.fBackend) {
202 return false;
203 }
204
205 switch (fBackend) {
209 return fFormatData->
equal(that.fFormatData.
get());
213#ifdef SK_DIRECT3D
215 return fDxgiFormat == that.fDxgiFormat;
216#endif
217 default:
219 }
220 return false;
221}
◆ textureType()
◆ GrBackendFormatData
◆ GrBackendSurfacePriv
◆ fColorType
◆ fCompressionType
◆ fIsStencilFormat
bool GrBackendFormat::fIsStencilFormat |
struct { ... } GrBackendFormat::fMock |
The documentation for this class was generated from the following files: