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

#include <GrMockCaps.h>

Inheritance diagram for GrMockCaps:
GrCaps SkCapabilities SkRefCnt SkRefCntBase

Public Member Functions

 GrMockCaps (const GrContextOptions &contextOptions, const GrMockOptions &options)
 
bool isFormatSRGB (const GrBackendFormat &format) const override
 
bool isFormatTexturable (const GrBackendFormat &format, GrTextureType) const override
 
bool isFormatCopyable (const GrBackendFormat &format) const override
 
bool isFormatAsColorTypeRenderable (GrColorType ct, const GrBackendFormat &format, int sampleCount=1) const override
 
bool isFormatRenderable (const GrBackendFormat &format, int sampleCount) const override
 
int getRenderTargetSampleCount (int requestCount, GrColorType) const
 
int getRenderTargetSampleCount (int requestCount, const GrBackendFormat &format) const override
 
int maxRenderTargetSampleCount (GrColorType ct) const
 
int maxRenderTargetSampleCount (const GrBackendFormat &format) const override
 
SupportedWrite supportedWritePixelsColorType (GrColorType surfaceColorType, const GrBackendFormat &surfaceFormat, GrColorType srcColorType) const override
 
SurfaceReadPixelsSupport surfaceSupportsReadPixels (const GrSurface *surface) const override
 
GrBackendFormat getBackendFormatFromCompressionType (SkTextureCompressionType) const override
 
skgpu::Swizzle getWriteSwizzle (const GrBackendFormat &format, GrColorType ct) const override
 
uint64_t computeFormatKey (const GrBackendFormat &) const override
 
GrProgramDesc makeDesc (GrRenderTarget *, const GrProgramInfo &, ProgramDescOverrideFlags) const override
 
- Public Member Functions inherited from GrCaps
 GrCaps (const GrContextOptions &)
 
void dumpJSON (SkJSONWriter *) const
 
const GrShaderCapsshaderCaps () const
 
bool npotTextureTileSupport () const
 
bool mipmapSupport () const
 
bool anisoSupport () const
 
bool gpuTracingSupport () const
 
bool oversizedStencilSupport () const
 
bool textureBarrierSupport () const
 
bool sampleLocationsSupport () const
 
bool drawInstancedSupport () const
 
bool nativeDrawIndirectSupport () const
 
bool useClientSideIndirectBuffers () const
 
bool conservativeRasterSupport () const
 
bool wireframeSupport () const
 
bool msaaResolvesAutomatically () const
 
bool preferDiscardableMSAAAttachment () const
 
bool halfFloatVertexAttributeSupport () const
 
bool usePrimitiveRestart () const
 
bool preferClientSideDynamicBuffers () const
 
bool preferFullscreenClears () const
 
bool discardStencilValuesAfterRenderPass () const
 
bool twoSidedStencilRefsAndMasksMustMatch () const
 
bool preferVRAMUseOverFlushes () const
 
bool avoidStencilBuffers () const
 
bool avoidWritePixelsFastPath () const
 
bool nativeDrawIndexedIndirectIsBroken () const
 
BlendEquationSupport blendEquationSupport () const
 
bool advancedBlendEquationSupport () const
 
bool advancedCoherentBlendEquationSupport () const
 
bool isAdvancedBlendEquationDisabled (skgpu::BlendEquation equation) const
 
bool shouldCollapseSrcOverToSrcWhenAble () const
 
bool mustSyncGpuDuringAbandon () const
 
bool reducedShaderMode () const
 
uint32_t mapBufferFlags () const
 
bool reuseScratchTextures () const
 
bool reuseScratchBuffers () const
 
int maxVertexAttributes () const
 maximum number of attribute values per vertex More...
 
int maxRenderTargetSize () const
 
int maxPreferredRenderTargetSize () const
 
int maxTextureSize () const
 
int maxWindowRectangles () const
 
bool isWindowRectanglesSupportedForRT (const GrBackendRenderTarget &rt) const
 
uint32_t maxPushConstantsSize () const
 
size_t transferBufferRowBytesAlignment () const
 
size_t transferFromBufferToBufferAlignment () const
 
size_t bufferUpdateDataPreserveAlignment () const
 
virtual bool isFormatSRGB (const GrBackendFormat &) const =0
 
bool isFormatCompressed (const GrBackendFormat &format) const
 
virtual bool isFormatTexturable (const GrBackendFormat &, GrTextureType) const =0
 
virtual bool isFormatCopyable (const GrBackendFormat &) const =0
 
virtual int maxRenderTargetSampleCount (const GrBackendFormat &) const =0
 
int internalMultisampleCount (const GrBackendFormat &format) const
 
virtual bool isFormatAsColorTypeRenderable (GrColorType ct, const GrBackendFormat &format, int sampleCount=1) const =0
 
virtual bool isFormatRenderable (const GrBackendFormat &format, int sampleCount) const =0
 
virtual int getRenderTargetSampleCount (int requestedCount, const GrBackendFormat &) const =0
 
bool surfaceSupportsWritePixels (const GrSurface *) const
 
virtual SurfaceReadPixelsSupport surfaceSupportsReadPixels (const GrSurface *) const =0
 
virtual SupportedWrite supportedWritePixelsColorType (GrColorType surfaceColorType, const GrBackendFormat &surfaceFormat, GrColorType srcColorType) const =0
 
SupportedRead supportedReadPixelsColorType (GrColorType srcColorType, const GrBackendFormat &srcFormat, GrColorType dstColorType) const
 
bool writePixelsRowBytesSupport () const
 
bool transferPixelsToRowBytesSupport () const
 
bool readPixelsRowBytesSupport () const
 
bool transferFromSurfaceToBufferSupport () const
 
bool transferFromBufferToTextureSupport () const
 
bool transferFromBufferToBufferSupport () const
 
bool suppressPrints () const
 
size_t bufferMapThreshold () const
 
bool mustClearUploadedBufferData () const
 
bool shouldInitializeTextures () const
 
bool buffersAreInitiallyZero () const
 
bool supportsAHardwareBufferImages () const
 
bool wireframeMode () const
 
bool semaphoreSupport () const
 
bool backendSemaphoreSupport () const
 
bool finishedProcAsyncCallbackSupport () const
 
bool crossContextTextureSupport () const
 
bool canCopySurface (const GrSurfaceProxy *dst, const SkIRect &dstRect, const GrSurfaceProxy *src, const SkIRect &srcRect) const
 
bool dynamicStateArrayGeometryProcessorTextureSupport () const
 
bool supportsProtectedContent () const
 
bool performPartialClearsAsDraws () const
 
bool performColorClearsAsDraws () const
 
bool avoidLargeIndexBufferDraws () const
 
bool performStencilClearsAsDraws () const
 
bool disableTessellationPathRenderer () const
 
GrDstSampleFlags getDstSampleFlagsForProxy (const GrRenderTargetProxy *, bool drawUsesMSAA) const
 
virtual DstCopyRestrictions getDstCopyRestrictions (const GrRenderTargetProxy *src, GrColorType ct) const
 
bool validateSurfaceParams (const SkISize &, const GrBackendFormat &, GrRenderable renderable, int renderTargetSampleCnt, skgpu::Mipmapped, GrTextureType) const
 
bool areColorTypeAndFormatCompatible (GrColorType grCT, const GrBackendFormat &format) const
 
GrBackendFormat getDefaultBackendFormat (GrColorType, GrRenderable) const
 
virtual GrBackendFormat getBackendFormatFromCompressionType (SkTextureCompressionType) const =0
 
bool clampToBorderSupport () const
 
skgpu::Swizzle getReadSwizzle (const GrBackendFormat &format, GrColorType colorType) const
 
virtual skgpu::Swizzle getWriteSwizzle (const GrBackendFormat &, GrColorType) const =0
 
virtual uint64_t computeFormatKey (const GrBackendFormat &) const =0
 
const GrDriverBugWorkaroundsworkarounds () const
 
virtual void addExtraSamplerKey (skgpu::KeyBuilder *, GrSamplerState, const GrBackendFormat &) const
 
 GR_DECL_BITFIELD_CLASS_OPS_FRIENDS (ProgramDescOverrideFlags)
 
virtual GrProgramDesc makeDesc (GrRenderTarget *, const GrProgramInfo &, ProgramDescOverrideFlags overrideFlags=ProgramDescOverrideFlags::kNone) const =0
 
virtual GrInternalSurfaceFlags getExtraSurfaceFlagsForDeferredRT () const
 
bool supportsDynamicMSAA (const GrRenderTargetProxy *) const
 
virtual bool dmsaaResolveCanBeUsedAsTextureInSameRenderPass () const
 
bool avoidReorderingRenderTasks () const
 
bool avoidDithering () const
 
bool disablePerspectiveSDFText () const
 
bool avoidLineDraws () const
 
std::tuple< GrColorType, GrBackendFormatgetFallbackColorTypeAndFormat (GrColorType, int sampleCount) const
 
- Public Member Functions inherited from SkCapabilities
SkSL::Version skslVersion () const
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Additional Inherited Members

- Public Types inherited from GrCaps
enum  BlendEquationSupport { kBasic_BlendEquationSupport , kAdvanced_BlendEquationSupport , kAdvancedCoherent_BlendEquationSupport , kLast_BlendEquationSupport = kAdvancedCoherent_BlendEquationSupport }
 
enum  MapFlags { kNone_MapFlags = 0x0 , kCanMap_MapFlag = 0x1 , kSubset_MapFlag = 0x2 , kAsyncRead_MapFlag = 0x4 }
 
enum class  SurfaceReadPixelsSupport { kSupported , kCopyToTexture2D , kUnsupported }
 
enum class  ProgramDescOverrideFlags { kNone = 0 , kVulkanHasResolveLoadSubpass = 0x1 }
 
- Static Public Member Functions inherited from SkCapabilities
static sk_sp< const SkCapabilitiesRasterBackend ()
 
- Protected Member Functions inherited from GrCaps
void finishInitialization (const GrContextOptions &options)
 
virtual bool onSupportsDynamicMSAA (const GrRenderTargetProxy *) const
 
- Protected Member Functions inherited from SkCapabilities
 SkCapabilities ()=default
 
void initSkCaps (const SkSL::ShaderCaps *)
 
- Protected Attributes inherited from GrCaps
std::unique_ptr< GrShaderCapsfShaderCaps
 
bool fNPOTTextureTileSupport: 1
 
bool fMipmapSupport: 1
 
bool fAnisoSupport: 1
 
bool fReuseScratchTextures: 1
 
bool fReuseScratchBuffers: 1
 
bool fGpuTracingSupport: 1
 
bool fOversizedStencilSupport: 1
 
bool fTextureBarrierSupport: 1
 
bool fSampleLocationsSupport: 1
 
bool fDrawInstancedSupport: 1
 
bool fNativeDrawIndirectSupport: 1
 
bool fUseClientSideIndirectBuffers: 1
 
bool fConservativeRasterSupport: 1
 
bool fWireframeSupport: 1
 
bool fMSAAResolvesAutomatically: 1
 
bool fPreferDiscardableMSAAAttachment: 1
 
bool fUsePrimitiveRestart: 1
 
bool fPreferClientSideDynamicBuffers: 1
 
bool fPreferFullscreenClears: 1
 
bool fTwoSidedStencilRefsAndMasksMustMatch: 1
 
bool fMustClearUploadedBufferData: 1
 
bool fBuffersAreInitiallyZero: 1
 
bool fShouldInitializeTextures: 1
 
bool fSupportsAHardwareBufferImages: 1
 
bool fHalfFloatVertexAttributeSupport: 1
 
bool fClampToBorderSupport: 1
 
bool fPerformPartialClearsAsDraws: 1
 
bool fPerformColorClearsAsDraws: 1
 
bool fAvoidLargeIndexBufferDraws: 1
 
bool fPerformStencilClearsAsDraws: 1
 
bool fTransferFromBufferToTextureSupport: 1
 
bool fTransferFromSurfaceToBufferSupport: 1
 
bool fTransferFromBufferToBufferSupport: 1
 
bool fWritePixelsRowBytesSupport: 1
 
bool fTransferPixelsToRowBytesSupport: 1
 
bool fReadPixelsRowBytesSupport: 1
 
bool fShouldCollapseSrcOverToSrcWhenAble: 1
 
bool fMustSyncGpuDuringAbandon: 1
 
bool fDisableTessellationPathRenderer: 1
 
bool fAvoidStencilBuffers: 1
 
bool fAvoidWritePixelsFastPath: 1
 
bool fNativeDrawIndexedIndirectIsBroken: 1
 
bool fAvoidReorderingRenderTasks: 1
 
bool fAvoidDithering: 1
 
bool fDisablePerspectiveSDFText: 1
 
bool fAvoidLineDraws: 1
 
bool fPreferVRAMUseOverFlushes: 1
 
bool fSemaphoreSupport: 1
 
bool fBackendSemaphoreSupport: 1
 
bool fFinishedProcAsyncCallbackSupport: 1
 
bool fCrossContextTextureSupport: 1
 
bool fDynamicStateArrayGeometryProcessorTextureSupport: 1
 
bool fSupportsProtectedContent: 1
 
BlendEquationSupport fBlendEquationSupport
 
uint32_t fAdvBlendEqDisableFlags
 
uint32_t fMapBufferFlags
 
int fBufferMapThreshold
 
int fMaxRenderTargetSize
 
int fMaxPreferredRenderTargetSize
 
int fMaxVertexAttributes
 
int fMaxTextureSize
 
int fMaxWindowRectangles
 
int fInternalMultisampleCount
 
uint32_t fMaxPushConstantsSize = 0
 
size_t fTransferBufferRowBytesAlignment = 1
 
size_t fTransferFromBufferToBufferAlignment = 1
 
size_t fBufferUpdateDataPreserveAlignment = 1
 
GrDriverBugWorkarounds fDriverBugWorkarounds
 
- Protected Attributes inherited from SkCapabilities
SkSL::Version fSkSLVersion = SkSL::Version::k100
 

Detailed Description

Definition at line 37 of file GrMockCaps.h.

Constructor & Destructor Documentation

◆ GrMockCaps()

GrMockCaps::GrMockCaps ( const GrContextOptions contextOptions,
const GrMockOptions options 
)
inline

Definition at line 39 of file GrMockCaps.h.

40 : INHERITED(contextOptions), fOptions(options) {
41 fMipmapSupport = options.fMipmapSupport;
42 fDrawInstancedSupport = options.fDrawInstancedSupport;
43 fHalfFloatVertexAttributeSupport = options.fHalfFloatVertexAttributeSupport;
44 fMapBufferFlags = options.fMapBufferFlags;
45 fBufferMapThreshold = SK_MaxS32; // Overridable in GrContextOptions.
46 fMaxTextureSize = options.fMaxTextureSize;
47 fMaxWindowRectangles = options.fMaxWindowRectangles;
50 fMaxVertexAttributes = options.fMaxVertexAttributes;
53
54 fShaderCaps = std::make_unique<GrShaderCaps>();
55 fShaderCaps->fIntegerSupport = options.fIntegerSupport;
56 fShaderCaps->fFlatInterpolationSupport = options.fFlatInterpolationSupport;
57 fShaderCaps->fMaxFragmentSamplers = options.fMaxFragmentSamplers;
58 fShaderCaps->fShaderDerivativeSupport = options.fShaderDerivativeSupport;
59 fShaderCaps->fDualSourceBlendingSupport = options.fDualSourceBlendingSupport;
60 fShaderCaps->fSampleMaskSupport = true;
61
62 this->finishInitialization(contextOptions);
63 }
const char * options
static constexpr int32_t SK_MaxS32
Definition: SkMath.h:21
bool fSupportsProtectedContent
Definition: GrCaps.h:648
int fMaxPreferredRenderTargetSize
Definition: GrCaps.h:658
int fMaxVertexAttributes
Definition: GrCaps.h:659
int fMaxRenderTargetSize
Definition: GrCaps.h:657
std::unique_ptr< GrShaderCaps > fShaderCaps
Definition: GrCaps.h:584
int fBufferMapThreshold
Definition: GrCaps.h:655
bool fHalfFloatVertexAttributeSupport
Definition: GrCaps.h:610
bool fSampleLocationsSupport
Definition: GrCaps.h:594
int fMaxWindowRectangles
Definition: GrCaps.h:661
bool fMipmapSupport
Definition: GrCaps.h:587
uint32_t fMapBufferFlags
Definition: GrCaps.h:654
void finishInitialization(const GrContextOptions &options)
Definition: GrCaps.cpp:107
bool fDrawInstancedSupport
Definition: GrCaps.h:595
int fMaxTextureSize
Definition: GrCaps.h:660
static float min(float r, float g, float b)
Definition: hsl.cpp:48

Member Function Documentation

◆ computeFormatKey()

uint64_t GrMockCaps::computeFormatKey ( const GrBackendFormat format) const
overridevirtual

Implements GrCaps.

Definition at line 38 of file GrMockCaps.cpp.

38 {
39#ifdef SK_DEBUG
40 SkTextureCompressionType compression = format.asMockCompressionType();
42#endif
43 auto ct = format.asMockColorType();
44 return (uint64_t)ct;
45}
#define SkASSERT(cond)
Definition: SkAssert.h:116
SkTextureCompressionType
uint32_t uint32_t * format

◆ getBackendFormatFromCompressionType()

GrBackendFormat GrMockCaps::getBackendFormatFromCompressionType ( SkTextureCompressionType  ) const
inlineoverridevirtual

Implements GrCaps.

Definition at line 152 of file GrMockCaps.h.

152 {
153 return {};
154 }

◆ getRenderTargetSampleCount() [1/2]

int GrMockCaps::getRenderTargetSampleCount ( int  requestCount,
const GrBackendFormat format 
) const
inlineoverridevirtual

Implements GrCaps.

Definition at line 110 of file GrMockCaps.h.

111 {
112 SkTextureCompressionType compression = format.asMockCompressionType();
113 if (compression != SkTextureCompressionType::kNone) {
114 return 0; // no compressed format is renderable
115 }
116
117 return this->getRenderTargetSampleCount(requestCount, format.asMockColorType());
118 }
int getRenderTargetSampleCount(int requestCount, GrColorType) const
Definition: GrMockCaps.cpp:15

◆ getRenderTargetSampleCount() [2/2]

int GrMockCaps::getRenderTargetSampleCount ( int  requestCount,
GrColorType  ct 
) const

Definition at line 15 of file GrMockCaps.cpp.

15 {
16 requestCount = std::max(requestCount, 1);
17
18 switch (fOptions.fConfigOptions[(int)ct].fRenderability) {
19 case GrMockOptions::ConfigOptions::Renderability::kNo:
20 return 0;
21 case GrMockOptions::ConfigOptions::Renderability::kNonMSAA:
22 return requestCount > 1 ? 0 : 1;
23 case GrMockOptions::ConfigOptions::Renderability::kMSAA:
24 return requestCount > kMaxSampleCnt ? 0 : GrNextPow2(requestCount);
25 }
26 return 0;
27}
static uint32_t GrNextPow2(uint32_t n)
Definition: SkMathPriv.h:302
static float max(float r, float g, float b)
Definition: hsl.cpp:49
ConfigOptions fConfigOptions[kGrColorTypeCnt]
Definition: GrMockTypes.h:151

◆ getWriteSwizzle()

skgpu::Swizzle GrMockCaps::getWriteSwizzle ( const GrBackendFormat ,
GrColorType   
) const
inlineoverridevirtual

Returns the skgpu::Swizzle to use when writing colors to a surface with the passed in GrBackendFormat and GrColorType.

Implements GrCaps.

Definition at line 156 of file GrMockCaps.h.

156 {
158 return skgpu::Swizzle("rgba");
159 }
bool areColorTypeAndFormatCompatible(GrColorType grCT, const GrBackendFormat &format) const
Definition: GrCaps.cpp:428

◆ isFormatAsColorTypeRenderable()

bool GrMockCaps::isFormatAsColorTypeRenderable ( GrColorType  ct,
const GrBackendFormat format,
int  sampleCount = 1 
) const
inlineoverridevirtual

Implements GrCaps.

Definition at line 89 of file GrMockCaps.h.

90 {
91 // Currently we don't allow RGB_888X to be renderable because we don't have a way to
92 // handle blends that reference dst alpha when the values in the dst alpha channel are
93 // uninitialized.
94 if (ct == GrColorType::kRGB_888x) {
95 return false;
96 }
97 return this->isFormatRenderable(format, sampleCount);
98 }
bool isFormatRenderable(const GrBackendFormat &format, int sampleCount) const override
Definition: GrMockCaps.h:100

◆ isFormatCopyable()

bool GrMockCaps::isFormatCopyable ( const GrBackendFormat format) const
inlineoverridevirtual

Implements GrCaps.

Definition at line 85 of file GrMockCaps.h.

85 {
86 return false;
87 }

◆ isFormatRenderable()

bool GrMockCaps::isFormatRenderable ( const GrBackendFormat format,
int  sampleCount 
) const
inlineoverridevirtual

Implements GrCaps.

Definition at line 100 of file GrMockCaps.h.

100 {
101 if (format.asMockCompressionType() != SkTextureCompressionType::kNone) {
102 return false; // compressed formats are never renderable
103 }
104
105 return sampleCount <= this->maxRenderTargetSampleCount(format.asMockColorType());
106 }
GrColorType asMockColorType() const
int maxRenderTargetSampleCount(GrColorType ct) const
Definition: GrMockCaps.h:120

◆ isFormatSRGB()

bool GrMockCaps::isFormatSRGB ( const GrBackendFormat format) const
inlineoverridevirtual

Implements GrCaps.

Definition at line 65 of file GrMockCaps.h.

65 {
66 SkTextureCompressionType compression = format.asMockCompressionType();
67 if (compression != SkTextureCompressionType::kNone) {
68 return false;
69 }
70
71 auto ct = format.asMockColorType();
73 }
static constexpr GrColorFormatDesc GrGetColorTypeDesc(GrColorType ct)
Definition: GrTypesPriv.h:794
constexpr GrColorTypeEncoding encoding() const
Definition: GrTypesPriv.h:774

◆ isFormatTexturable()

bool GrMockCaps::isFormatTexturable ( const GrBackendFormat format,
GrTextureType   
) const
inlineoverridevirtual

Implements GrCaps.

Definition at line 75 of file GrMockCaps.h.

75 {
76 SkTextureCompressionType compression = format.asMockCompressionType();
77 if (compression != SkTextureCompressionType::kNone) {
78 return fOptions.fCompressedOptions[(int)compression].fTexturable;
79 }
80
81 auto index = static_cast<int>(format.asMockColorType());
82 return fOptions.fConfigOptions[index].fTexturable;
83 }
ConfigOptions fCompressedOptions[kSkTextureCompressionTypeCount]
Definition: GrMockTypes.h:152

◆ makeDesc()

GrProgramDesc GrMockCaps::makeDesc ( GrRenderTarget ,
const GrProgramInfo programInfo,
ProgramDescOverrideFlags  overrideFlags 
) const
overridevirtual

Implements GrCaps.

Definition at line 29 of file GrMockCaps.cpp.

31 {
34 GrProgramDesc::Build(&desc, programInfo, *this);
35 return desc;
36}
static void Build(GrProgramDesc *, const GrProgramInfo &, const GrCaps &)

◆ maxRenderTargetSampleCount() [1/2]

int GrMockCaps::maxRenderTargetSampleCount ( const GrBackendFormat format) const
inlineoverridevirtual

Implements GrCaps.

Definition at line 132 of file GrMockCaps.h.

132 {
133 SkTextureCompressionType compression = format.asMockCompressionType();
134 if (compression != SkTextureCompressionType::kNone) {
135 return 0; // no compressed format is renderable
136 }
137
138 return this->maxRenderTargetSampleCount(format.asMockColorType());
139 }

◆ maxRenderTargetSampleCount() [2/2]

int GrMockCaps::maxRenderTargetSampleCount ( GrColorType  ct) const
inline

Definition at line 120 of file GrMockCaps.h.

120 {
121 switch (fOptions.fConfigOptions[(int)ct].fRenderability) {
122 case GrMockOptions::ConfigOptions::Renderability::kNo:
123 return 0;
124 case GrMockOptions::ConfigOptions::Renderability::kNonMSAA:
125 return 1;
126 case GrMockOptions::ConfigOptions::Renderability::kMSAA:
127 return kMaxSampleCnt;
128 }
129 return 0;
130 }

◆ supportedWritePixelsColorType()

SupportedWrite GrMockCaps::supportedWritePixelsColorType ( GrColorType  surfaceColorType,
const GrBackendFormat surfaceFormat,
GrColorType  srcColorType 
) const
inlineoverridevirtual

Given a dst pixel config and a src color type what color type must the caller coax the the data into in order to use GrGpu::writePixels().

Implements GrCaps.

Definition at line 141 of file GrMockCaps.h.

143 {
144 return {surfaceColorType, 1};
145 }

◆ surfaceSupportsReadPixels()

SurfaceReadPixelsSupport GrMockCaps::surfaceSupportsReadPixels ( const GrSurface ) const
inlineoverridevirtual

Backends may have restrictions on what types of surfaces support GrGpu::readPixels(). We may either be able to read directly from the surface, read from a copy of the surface, or not read at all.

Implements GrCaps.

Definition at line 147 of file GrMockCaps.h.


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