84 fSuppressPrints =
options.fSuppressPrints;
85#if defined(GR_TEST_UTILS)
86 fWireframeMode =
options.fWireframeMode;
88 fWireframeMode =
false;
114 this->applyOptionsOverrides(
options);
126 if (
options.fDisableDriverCorrectnessWorkarounds) {
146#if defined(GR_TEST_UTILS)
147 if (
options.fSuppressAdvancedBlendEquations) {
150 if (
options.fClearAllTextures) {
153 if (
options.fDisallowWriteAndTransferPixelRowBytes) {
158 if (
options.fSuppressMipmapSupport) {
163 SkDebugf(
"WARNING: capping window rectangles at %i. HW advertises support for %i.\n",
174 if (
options.fDisableTessellationPathRenderer) {
180#ifdef SK_ENABLE_DUMP_GPU
200 str.
append(
" async_read");
231 writer->
appendBool(
"Two-sided Stencil Refs And Masks Must Match",
242 writer->
appendBool(
"Specify GeometryProcessor textures as a dynamic state array",
249 writer->
appendBool(
"Supports transfers from buffers to textures",
251 writer->
appendBool(
"Supports transfers from textures to buffers",
256 writer->
appendBool(
"Disable TessellationPathRenderer current driver [workaround]",
263 writer->
appendBool(
"Native draw indexed indirect is broken [workaround]",
280 static const char* kBlendEquationSupportNames[] = {
311 if (
dst->readOnly()) {
315 if (
dst->backendFormat() !=
src->backendFormat()) {
340 if (dimensions.
width() < 1 || dimensions.
height() < 1) {
349 if (dimensions.
width() > maxRTSize || dimensions.
height() > maxRTSize) {
354 if (renderTargetSampleCnt != 1) {
358 if (dimensions.
width() > maxSize || dimensions.
height() > maxSize) {
375 read.fOffsetAlignmentForTransferBuffer = 0;
383 switch (
read.fOffsetAlignmentForTransferBuffer & 0b11) {
389 read.fOffsetAlignmentForTransferBuffer *= 2;
393 read.fOffsetAlignmentForTransferBuffer *= 4;
449 SkDEBUGFAILF(
"Illegal color type (%d) and compressed format (%d) combination.",
462 bool drawUsesMSAA)
const {
501 int sampleCnt)
const {
506 if (
format.isValid() && this->isFormatRenderable(
format, sampleCnt)) {
SkTextureCompressionType GrBackendFormatToCompressionType(const GrBackendFormat &format)
static GrColorType color_type_fallback(GrColorType ct)
static constexpr uint32_t GrColorTypeChannelFlags(GrColorType ct)
static constexpr size_t GrColorTypeBytesPerPixel(GrColorType ct)
#define SkDEBUGFAILF(fmt,...)
@ kRGB_SkColorChannelFlags
@ kRGBA_SkColorChannelFlags
@ kAlpha_SkColorChannelFlag
@ kGray_SkColorChannelFlag
static constexpr bool SkTextureCompressionTypeIsOpaque(SkTextureCompressionType compression)
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static bool read(SkStream *stream, void *buffer, size_t amount)
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
virtual skgpu::Swizzle onGetReadSwizzle(const GrBackendFormat &, GrColorType) const =0
bool fSupportsProtectedContent
bool advancedBlendEquationSupport() const
virtual void onApplyOptionsOverrides(const GrContextOptions &)
bool fDynamicStateArrayGeometryProcessorTextureSupport
int fMaxPreferredRenderTargetSize
bool fFinishedProcAsyncCallbackSupport
std::tuple< GrColorType, GrBackendFormat > getFallbackColorTypeAndFormat(GrColorType, int sampleCount) const
bool fAvoidStencilBuffers
bool mipmapSupport() const
bool fReadPixelsRowBytesSupport
GrDstSampleFlags getDstSampleFlagsForProxy(const GrRenderTargetProxy *, bool drawUsesMSAA) const
virtual bool isFormatTexturable(const GrBackendFormat &, GrTextureType) const =0
virtual GrDstSampleFlags onGetDstSampleFlagsForProxy(const GrRenderTargetProxy *) const
bool fNativeDrawIndexedIndirectIsBroken
const GrShaderCaps * shaderCaps() const
std::unique_ptr< GrShaderCaps > fShaderCaps
virtual SupportedWrite supportedWritePixelsColorType(GrColorType surfaceColorType, const GrBackendFormat &surfaceFormat, GrColorType srcColorType) const =0
bool fPreferClientSideDynamicBuffers
bool fMSAAResolvesAutomatically
bool fReuseScratchTextures
bool surfaceSupportsWritePixels(const GrSurface *) const
GrDriverBugWorkarounds fDriverBugWorkarounds
bool fNativeDrawIndirectSupport
GrCaps(const GrContextOptions &)
bool fPreferVRAMUseOverFlushes
int maxTextureSize() const
bool fTransferFromBufferToBufferSupport
int maxRenderTargetSize() const
virtual void onDumpJSON(SkJSONWriter *) const
bool fTransferFromBufferToTextureSupport
virtual bool onAreColorTypeAndFormatCompatible(GrColorType, const GrBackendFormat &) const =0
bool fTextureBarrierSupport
bool fAvoidLargeIndexBufferDraws
uint32_t fAdvBlendEqDisableFlags
bool fBuffersAreInitiallyZero
bool fTransferPixelsToRowBytesSupport
bool fMustSyncGpuDuringAbandon
bool fBackendSemaphoreSupport
@ kAdvancedCoherent_BlendEquationSupport
@ kLast_BlendEquationSupport
@ kAdvanced_BlendEquationSupport
@ kBasic_BlendEquationSupport
void dumpJSON(SkJSONWriter *) const
bool fHalfFloatVertexAttributeSupport
bool fClampToBorderSupport
bool fSampleLocationsSupport
bool fOversizedStencilSupport
bool areColorTypeAndFormatCompatible(GrColorType grCT, const GrBackendFormat &format) const
bool supportsDynamicMSAA(const GrRenderTargetProxy *) const
bool fTwoSidedStencilRefsAndMasksMustMatch
GrBackendFormat getDefaultBackendFormat(GrColorType, GrRenderable) const
virtual bool onCanCopySurface(const GrSurfaceProxy *dst, const SkIRect &dstRect, const GrSurfaceProxy *src, const SkIRect &srcRect) const =0
bool fUsePrimitiveRestart
virtual bool isFormatRenderable(const GrBackendFormat &format, int sampleCount) const =0
int fInternalMultisampleCount
bool isFormatCompressed(const GrBackendFormat &format) const
bool fPerformPartialClearsAsDraws
bool fReuseScratchBuffers
virtual SupportedRead onSupportedReadPixelsColorType(GrColorType srcColorType, const GrBackendFormat &srcFormat, GrColorType dstColorType) const =0
bool fWritePixelsRowBytesSupport
bool fShouldCollapseSrcOverToSrcWhenAble
bool textureBarrierSupport() const
bool fPerformColorClearsAsDraws
bool fAvoidReorderingRenderTasks
SupportedRead supportedReadPixelsColorType(GrColorType srcColorType, const GrBackendFormat &srcFormat, GrColorType dstColorType) const
virtual bool isFormatAsColorTypeRenderable(GrColorType ct, const GrBackendFormat &format, int sampleCount=1) const =0
virtual bool onSupportsDynamicMSAA(const GrRenderTargetProxy *) const
bool fNPOTTextureTileSupport
bool validateSurfaceParams(const SkISize &, const GrBackendFormat &, GrRenderable renderable, int renderTargetSampleCnt, skgpu::Mipmapped, GrTextureType) const
bool fSupportsAHardwareBufferImages
bool fTransferFromSurfaceToBufferSupport
bool fMustClearUploadedBufferData
void finishInitialization(const GrContextOptions &options)
virtual bool onSurfaceSupportsWritePixels(const GrSurface *) const =0
bool canCopySurface(const GrSurfaceProxy *dst, const SkIRect &dstRect, const GrSurfaceProxy *src, const SkIRect &srcRect) const
bool fShouldInitializeTextures
virtual GrBackendFormat onGetDefaultBackendFormat(GrColorType) const =0
bool fAvoidWritePixelsFastPath
BlendEquationSupport fBlendEquationSupport
bool fPreferDiscardableMSAAAttachment
bool msaaResolvesAutomatically() const
bool fConservativeRasterSupport
bool fDisableTessellationPathRenderer
int internalMultisampleCount(const GrBackendFormat &format) const
bool fUseClientSideIndirectBuffers
bool fPerformStencilClearsAsDraws
bool fDrawInstancedSupport
bool fDisablePerspectiveSDFText
bool fCrossContextTextureSupport
bool fPreferFullscreenClears
skgpu::Swizzle getReadSwizzle(const GrBackendFormat &format, GrColorType colorType) const
void applyOverrides(const GrDriverBugWorkarounds &workarounds)
const GrBackendFormat & backendFormat() const
static constexpr int kMaxWindows
void initSkCaps(const SkSL::ShaderCaps *)
void appendS32(int32_t value)
void beginObject(const char *name=nullptr, bool multiline=true)
void appendBool(bool value)
void appendName(const char *name)
void appendCString(const char *value)
void appendString(const char *value, size_t size)
void appendHexU32(uint32_t value)
void append(const char text[])
static constexpr Swizzle RGBA()
FlutterSemanticsFlag flags
uint32_t uint32_t * format
static float min(float r, float g, float b)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
void dumpJSON(SkJSONWriter *) const
static constexpr SkIRect MakeSize(const SkISize &size)
bool contains(int32_t x, int32_t y) const
constexpr int32_t width() const
constexpr int32_t height() const