Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
GrCaps.cpp
Go to the documentation of this file.
1/*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
9
11#include "include/core/SkRect.h"
12#include "include/core/SkSize.h"
25
28 fMipmapSupport = false;
29 fAnisoSupport = false;
32 fGpuTracingSupport = false;
40 fWireframeSupport = false;
51 fSemaphoreSupport = false;
71
74
76
83
84 fSuppressPrints = options.fSuppressPrints;
85#if defined(GR_TEST_UTILS)
86 fWireframeMode = options.fWireframeMode;
87#else
88 fWireframeMode = false;
89#endif
90 fBufferMapThreshold = options.fBufferMapThreshold;
95 fAvoidDithering = false;
96 fAvoidLineDraws = false;
98
100
101 // Default to true, allow older versions of OpenGL to disable explicitly
103
104 fDriverBugWorkarounds = options.fDriverBugWorkarounds;
105}
106
109 // We will implement indirect draws with a polyfill, so the commands need to reside in CPU
110 // memory.
112 }
113
114 this->applyOptionsOverrides(options);
115
116 // Our render targets are always created with textures as the color attachment, hence this min:
119
120 this->initSkCaps(this->shaderCaps());
121}
122
123void GrCaps::applyOptionsOverrides(const GrContextOptions& options) {
124 fShaderCaps->applyOptionsOverrides(options);
125 this->onApplyOptionsOverrides(options);
126 if (options.fDisableDriverCorrectnessWorkarounds) {
134 // Don't check the partial-clear workaround, since that is a backend limitation, not a
135 // driver workaround (it just so happens the fallbacks are the same).
136 }
137 if (GrContextOptions::Enable::kNo == options.fUseDrawInsteadOfClear) {
140 } else if (GrContextOptions::Enable::kYes == options.fUseDrawInsteadOfClear) {
143 }
144
145 fMaxTextureSize = std::min(fMaxTextureSize, options.fMaxTextureSizeOverride);
146#if defined(GR_TEST_UTILS)
147 if (options.fSuppressAdvancedBlendEquations) {
149 }
150 if (options.fClearAllTextures) {
152 }
153 if (options.fDisallowWriteAndTransferPixelRowBytes) {
156 }
157#endif
158 if (options.fSuppressMipmapSupport) {
159 fMipmapSupport = false;
160 }
161
163 SkDebugf("WARNING: capping window rectangles at %i. HW advertises support for %i.\n",
166 }
167
168 fInternalMultisampleCount = options.fInternalMultisampleCount;
169
170 fAvoidStencilBuffers = options.fAvoidStencilBuffers;
171
172 fDriverBugWorkarounds.applyOverrides(options.fDriverBugWorkarounds);
173
174 if (options.fDisableTessellationPathRenderer) {
176 }
177}
178
179
180#ifdef SK_ENABLE_DUMP_GPU
183
184static SkString map_flags_to_string(uint32_t flags) {
185 SkString str;
187 str = "none";
188 } else {
191 str = "can_map";
192
194 str.append(" partial");
195 } else {
196 str.append(" full");
197 }
200 str.append(" async_read");
201 } else {
202 str.append(" sync_read");
203 }
205 }
206 SkASSERT(0 == flags); // Make sure we handled all the flags.
207 return str;
208}
209
210void GrCaps::dumpJSON(SkJSONWriter* writer) const {
211 writer->beginObject();
212
213 writer->appendBool("NPOT Texture Tile Support", fNPOTTextureTileSupport);
214 writer->appendBool("MIP Map Support", fMipmapSupport);
215 writer->appendBool("Aniso Support", fAnisoSupport);
216 writer->appendBool("Reuse Scratch Textures", fReuseScratchTextures);
217 writer->appendBool("Reuse Scratch Buffers", fReuseScratchBuffers);
218 writer->appendBool("Gpu Tracing Support", fGpuTracingSupport);
219 writer->appendBool("Oversized Stencil Support", fOversizedStencilSupport);
220 writer->appendBool("Texture Barrier Support", fTextureBarrierSupport);
221 writer->appendBool("Sample Locations Support", fSampleLocationsSupport);
222 writer->appendBool("Draw Instanced Support", fDrawInstancedSupport);
223 writer->appendBool("Native Draw Indirect Support", fNativeDrawIndirectSupport);
224 writer->appendBool("Use client side indirect buffers", fUseClientSideIndirectBuffers);
225 writer->appendBool("Conservative Raster Support", fConservativeRasterSupport);
226 writer->appendBool("Wireframe Support", fWireframeSupport);
227 writer->appendBool("MSAA Resolves Automatically", fMSAAResolvesAutomatically);
228 writer->appendBool("Use primitive restart", fUsePrimitiveRestart);
229 writer->appendBool("Prefer client-side dynamic buffers", fPreferClientSideDynamicBuffers);
230 writer->appendBool("Prefer fullscreen clears (and stencil discard)", fPreferFullscreenClears);
231 writer->appendBool("Two-sided Stencil Refs And Masks Must Match",
233 writer->appendBool("Must clear buffer memory", fMustClearUploadedBufferData);
234 writer->appendBool("Should initialize textures", fShouldInitializeTextures);
235 writer->appendBool("Buffers are initially zero", fBuffersAreInitiallyZero);
236 writer->appendBool("Supports importing AHardwareBuffers", fSupportsAHardwareBufferImages);
237 writer->appendBool("Semaphore support", fSemaphoreSupport);
238 writer->appendBool("Backend Semaphore support", fBackendSemaphoreSupport);
239 writer->appendBool("FinishedProc async callback support", fFinishedProcAsyncCallbackSupport);
240 writer->appendBool("Cross context texture support", fCrossContextTextureSupport);
241 writer->appendBool("Half float vertex attribute support", fHalfFloatVertexAttributeSupport);
242 writer->appendBool("Specify GeometryProcessor textures as a dynamic state array",
244 writer->appendBool("Supports Protected content", fSupportsProtectedContent);
245 writer->appendBool("Use draws for partial clears", fPerformPartialClearsAsDraws);
246 writer->appendBool("Use draws for color clears", fPerformColorClearsAsDraws);
247 writer->appendBool("Avoid Large IndexBuffer Draws", fAvoidLargeIndexBufferDraws);
248 writer->appendBool("Use draws for stencil clip clears", fPerformStencilClearsAsDraws);
249 writer->appendBool("Supports transfers from buffers to textures",
251 writer->appendBool("Supports transfers from textures to buffers",
253 writer->appendBool("Write pixels row bytes support", fWritePixelsRowBytesSupport);
254 writer->appendBool("Transfer pixels to row bytes support", fTransferPixelsToRowBytesSupport);
255 writer->appendBool("Read pixels row bytes support", fReadPixelsRowBytesSupport);
256 writer->appendBool("Disable TessellationPathRenderer current driver [workaround]",
258 writer->appendBool("Clamp-to-border", fClampToBorderSupport);
259
260 writer->appendBool("Prefer VRAM Use over flushes [workaround]", fPreferVRAMUseOverFlushes);
261 writer->appendBool("Avoid stencil buffers [workaround]", fAvoidStencilBuffers);
262 writer->appendBool("Avoid writePixels fast path [workaround]", fAvoidWritePixelsFastPath);
263 writer->appendBool("Native draw indexed indirect is broken [workaround]",
265 writer->appendBool("Avoid DAG reordering [workaround]", fAvoidReorderingRenderTasks);
266 writer->appendBool("Avoid Dithering [workaround]", fAvoidDithering);
267 writer->appendBool("Disable perspective SDF Text [workaround]", fDisablePerspectiveSDFText);
268
269 if (this->advancedBlendEquationSupport()) {
270 writer->appendHexU32("Advanced Blend Equation Disable Flags", fAdvBlendEqDisableFlags);
271 }
272
273 writer->appendS32("Max Vertex Attributes", fMaxVertexAttributes);
274 writer->appendS32("Max Texture Size", fMaxTextureSize);
275 writer->appendS32("Max Render Target Size", fMaxRenderTargetSize);
276 writer->appendS32("Max Preferred Render Target Size", fMaxPreferredRenderTargetSize);
277 writer->appendS32("Max Window Rectangles", fMaxWindowRectangles);
278 writer->appendS32("Sample Count for Internal MSAA", fInternalMultisampleCount);
279
280 static const char* kBlendEquationSupportNames[] = {
281 "Basic",
282 "Advanced",
283 "Advanced Coherent",
284 };
285 static_assert(0 == kBasic_BlendEquationSupport);
286 static_assert(1 == kAdvanced_BlendEquationSupport);
287 static_assert(2 == kAdvancedCoherent_BlendEquationSupport);
288 static_assert(std::size(kBlendEquationSupportNames) == kLast_BlendEquationSupport + 1);
289
290 writer->appendCString("Blend Equation Support",
291 kBlendEquationSupportNames[fBlendEquationSupport]);
292 writer->appendString("Map Buffer Support", map_flags_to_string(fMapBufferFlags));
293
294 this->onDumpJSON(writer);
295
296 writer->appendName("shaderCaps");
297 this->shaderCaps()->dumpJSON(writer);
298
299 writer->endObject();
300}
301#else
302void GrCaps::dumpJSON(SkJSONWriter* writer) const { }
303#endif
304
306 return surface->readOnly() ? false : this->onSurfaceSupportsWritePixels(surface);
307}
308
309bool GrCaps::canCopySurface(const GrSurfaceProxy* dst, const SkIRect& dstRect,
310 const GrSurfaceProxy* src, const SkIRect& srcRect) const {
311 if (dst->readOnly()) {
312 return false;
313 }
314
315 if (dst->backendFormat() != src->backendFormat()) {
316 return false;
317 }
318 // For simplicity, all GrGpu::copySurface() calls can assume that srcRect and dstRect
319 // are already contained within their respective surfaces.
320 if (!SkIRect::MakeSize(dst->dimensions()).contains(dstRect) ||
321 !SkIRect::MakeSize(src->dimensions()).contains(srcRect)) {
322 return false;
323 }
324 return this->onCanCopySurface(dst, dstRect, src, srcRect);
325}
326
328 GrRenderable renderable, int renderTargetSampleCnt,
329 skgpu::Mipmapped mipped, GrTextureType textureType) const {
330 if (textureType != GrTextureType::kNone) {
331 if (!this->isFormatTexturable(format, textureType)) {
332 return false;
333 }
334 }
335
336 if (skgpu::Mipmapped::kYes == mipped && !this->mipmapSupport()) {
337 return false;
338 }
339
340 if (dimensions.width() < 1 || dimensions.height() < 1) {
341 return false;
342 }
343
344 if (renderable == GrRenderable::kYes) {
345 if (!this->isFormatRenderable(format, renderTargetSampleCnt)) {
346 return false;
347 }
348 int maxRTSize = this->maxRenderTargetSize();
349 if (dimensions.width() > maxRTSize || dimensions.height() > maxRTSize) {
350 return false;
351 }
352 } else {
353 // We currently do not support multisampled textures
354 if (renderTargetSampleCnt != 1) {
355 return false;
356 }
357 int maxSize = this->maxTextureSize();
358 if (dimensions.width() > maxSize || dimensions.height() > maxSize) {
359 return false;
360 }
361 }
362
363 return true;
364}
365
367 const GrBackendFormat& srcFormat,
368 GrColorType dstColorType) const {
369 SupportedRead read = this->onSupportedReadPixelsColorType(srcColorType, srcFormat,
370 dstColorType);
371
372 // There are known problems with 24 vs 32 bit BPP with this color type. Just fail for now if
373 // using a transfer buffer.
374 if (GrColorType::kRGB_888x == read.fColorType) {
375 read.fOffsetAlignmentForTransferBuffer = 0;
376 }
377 // It's very convenient to access 1 byte-per-channel 32 bit color types as uint32_t on the CPU.
378 // Make those aligned reads out of the buffer even if the underlying API doesn't require it.
379 auto channelFlags = GrColorTypeChannelFlags(read.fColorType);
380 if ((channelFlags == kRGBA_SkColorChannelFlags || channelFlags == kRGB_SkColorChannelFlags ||
381 channelFlags == kAlpha_SkColorChannelFlag || channelFlags == kGray_SkColorChannelFlag) &&
382 GrColorTypeBytesPerPixel(read.fColorType) == 4) {
383 switch (read.fOffsetAlignmentForTransferBuffer & 0b11) {
384 // offset alignment already a multiple of 4
385 case 0:
386 break;
387 // offset alignment is a multiple of 2 but not 4.
388 case 2:
389 read.fOffsetAlignmentForTransferBuffer *= 2;
390 break;
391 // offset alignment is not a multiple of 2.
392 default:
393 read.fOffsetAlignmentForTransferBuffer *= 4;
394 break;
395 }
396 }
397 return read;
398}
399
401 GrRenderable renderable) const {
402 // Unknown color types are always an invalid format, so early out before calling virtual.
404 return {};
405 }
406
407 auto format = this->onGetDefaultBackendFormat(colorType);
409 return {};
410 }
411 if (!this->areColorTypeAndFormatCompatible(colorType, format)) {
412 return {};
413 }
414 // Currently we require that it be possible to write pixels into the "default" format. Perhaps,
415 // that could be a separate requirement from the caller. It seems less necessary if
416 // renderability was requested.
419 return {};
420 }
421 if (renderable == GrRenderable::kYes &&
422 !this->isFormatAsColorTypeRenderable(colorType, format)) {
423 return {};
424 }
425 return format;
426}
427
429 const GrBackendFormat& format) const {
430 if (GrColorType::kUnknown == grCT) {
431 return false;
432 }
433
435 if (compression != SkTextureCompressionType::kNone) {
436 return grCT == (SkTextureCompressionTypeIsOpaque(compression) ? GrColorType::kRGB_888x
438 }
439
440 return this->onAreColorTypeAndFormatCompatible(grCT, format);
441}
442
445 if (compression != SkTextureCompressionType::kNone) {
447 return skgpu::Swizzle::RGBA();
448 }
449 SkDEBUGFAILF("Illegal color type (%d) and compressed format (%d) combination.",
450 (int)colorType, (int)compression);
451 return {};
452 }
453
454 return this->onGetReadSwizzle(format, colorType);
455}
456
460
462 bool drawUsesMSAA) const {
463 SkASSERT(rt);
464 if (this->textureBarrierSupport() && (!drawUsesMSAA || this->msaaResolvesAutomatically())) {
465 return this->onGetDstSampleFlagsForProxy(rt);
466 }
468}
469
471 return rtProxy->numSamples() == 1 &&
472 this->internalMultisampleCount(rtProxy->backendFormat()) > 1 &&
473 this->onSupportsDynamicMSAA(rtProxy);
474}
475
477 switch (ct) {
478 // kRGBA_8888 is our default fallback for many color types that may not have renderable
479 // backend formats.
494 default:
496 }
497}
498
499std::tuple<GrColorType, GrBackendFormat> GrCaps::getFallbackColorTypeAndFormat(
500 GrColorType ct,
501 int sampleCnt) const {
502 do {
503 auto format = this->getDefaultBackendFormat(ct, GrRenderable::kYes);
504 // We continue to the fallback color type if there no default renderable format or we
505 // requested msaa and the format doesn't support msaa.
506 if (format.isValid() && this->isFormatRenderable(format, sampleCnt)) {
507 return {ct, format};
508 }
509 ct = color_type_fallback(ct);
510 } while (ct != GrColorType::kUnknown);
511 return {GrColorType::kUnknown, {}};
512}
const char * options
SkTextureCompressionType GrBackendFormatToCompressionType(const GrBackendFormat &format)
static GrColorType color_type_fallback(GrColorType ct)
Definition GrCaps.cpp:476
static constexpr uint32_t GrColorTypeChannelFlags(GrColorType ct)
static constexpr size_t GrColorTypeBytesPerPixel(GrColorType ct)
GrDstSampleFlags
GrTextureType
GrColorType
SkColorType fColorType
#define SkDEBUGFAILF(fmt,...)
Definition SkAssert.h:119
#define SkASSERT(cond)
Definition SkAssert.h:116
@ kRGB_SkColorChannelFlags
Definition SkColor.h:247
@ kRGBA_SkColorChannelFlags
Definition SkColor.h:248
@ kAlpha_SkColorChannelFlag
Definition SkColor.h:242
@ kGray_SkColorChannelFlag
Definition SkColor.h:243
static constexpr bool SkTextureCompressionTypeIsOpaque(SkTextureCompressionType compression)
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
#define SkDEBUGCODE(...)
Definition SkDebug.h:23
static bool read(SkStream *stream, void *buffer, size_t amount)
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
virtual skgpu::Swizzle onGetReadSwizzle(const GrBackendFormat &, GrColorType) const =0
bool fSupportsProtectedContent
Definition GrCaps.h:648
bool advancedBlendEquationSupport() const
Definition GrCaps.h:162
virtual void onApplyOptionsOverrides(const GrContextOptions &)
Definition GrCaps.h:677
bool fDynamicStateArrayGeometryProcessorTextureSupport
Definition GrCaps.h:646
int fMaxPreferredRenderTargetSize
Definition GrCaps.h:658
int fMaxVertexAttributes
Definition GrCaps.h:659
bool fFinishedProcAsyncCallbackSupport
Definition GrCaps.h:640
std::tuple< GrColorType, GrBackendFormat > getFallbackColorTypeAndFormat(GrColorType, int sampleCount) const
Definition GrCaps.cpp:499
bool fAvoidStencilBuffers
Definition GrCaps.h:627
bool mipmapSupport() const
Definition GrCaps.h:72
int fMaxRenderTargetSize
Definition GrCaps.h:657
bool fReadPixelsRowBytesSupport
Definition GrCaps.h:621
GrDstSampleFlags getDstSampleFlagsForProxy(const GrRenderTargetProxy *, bool drawUsesMSAA) const
Definition GrCaps.cpp:461
virtual bool isFormatTexturable(const GrBackendFormat &, GrTextureType) const =0
virtual GrDstSampleFlags onGetDstSampleFlagsForProxy(const GrRenderTargetProxy *) const
Definition GrCaps.h:698
bool fNativeDrawIndexedIndirectIsBroken
Definition GrCaps.h:629
const GrShaderCaps * shaderCaps() const
Definition GrCaps.h:63
std::unique_ptr< GrShaderCaps > fShaderCaps
Definition GrCaps.h:584
virtual SupportedWrite supportedWritePixelsColorType(GrColorType surfaceColorType, const GrBackendFormat &surfaceFormat, GrColorType srcColorType) const =0
bool fPreferClientSideDynamicBuffers
Definition GrCaps.h:603
bool fMSAAResolvesAutomatically
Definition GrCaps.h:600
bool fReuseScratchTextures
Definition GrCaps.h:589
bool surfaceSupportsWritePixels(const GrSurface *) const
Definition GrCaps.cpp:305
GrDriverBugWorkarounds fDriverBugWorkarounds
Definition GrCaps.h:668
bool fNativeDrawIndirectSupport
Definition GrCaps.h:596
GrCaps(const GrContextOptions &)
Definition GrCaps.cpp:26
bool fPreferVRAMUseOverFlushes
Definition GrCaps.h:636
bool fAnisoSupport
Definition GrCaps.h:588
int maxTextureSize() const
Definition GrCaps.h:229
bool fAvoidLineDraws
Definition GrCaps.h:633
bool fTransferFromBufferToBufferSupport
Definition GrCaps.h:618
int maxRenderTargetSize() const
Definition GrCaps.h:223
virtual void onDumpJSON(SkJSONWriter *) const
Definition GrCaps.h:678
bool fTransferFromBufferToTextureSupport
Definition GrCaps.h:616
virtual bool onAreColorTypeAndFormatCompatible(GrColorType, const GrBackendFormat &) const =0
bool fTextureBarrierSupport
Definition GrCaps.h:593
bool fAvoidLargeIndexBufferDraws
Definition GrCaps.h:614
uint32_t fAdvBlendEqDisableFlags
Definition GrCaps.h:651
bool fBuffersAreInitiallyZero
Definition GrCaps.h:607
bool fTransferPixelsToRowBytesSupport
Definition GrCaps.h:620
int fBufferMapThreshold
Definition GrCaps.h:655
bool fMustSyncGpuDuringAbandon
Definition GrCaps.h:623
bool fBackendSemaphoreSupport
Definition GrCaps.h:639
@ kAdvancedCoherent_BlendEquationSupport
Definition GrCaps.h:154
@ kLast_BlendEquationSupport
Definition GrCaps.h:157
@ kAdvanced_BlendEquationSupport
Definition GrCaps.h:152
@ kBasic_BlendEquationSupport
Definition GrCaps.h:150
void dumpJSON(SkJSONWriter *) const
Definition GrCaps.cpp:302
bool fHalfFloatVertexAttributeSupport
Definition GrCaps.h:610
bool fClampToBorderSupport
Definition GrCaps.h:611
bool fSampleLocationsSupport
Definition GrCaps.h:594
bool fGpuTracingSupport
Definition GrCaps.h:591
bool fOversizedStencilSupport
Definition GrCaps.h:592
bool fSemaphoreSupport
Definition GrCaps.h:638
bool areColorTypeAndFormatCompatible(GrColorType grCT, const GrBackendFormat &format) const
Definition GrCaps.cpp:428
bool supportsDynamicMSAA(const GrRenderTargetProxy *) const
Definition GrCaps.cpp:470
int fMaxWindowRectangles
Definition GrCaps.h:661
bool fTwoSidedStencilRefsAndMasksMustMatch
Definition GrCaps.h:605
GrBackendFormat getDefaultBackendFormat(GrColorType, GrRenderable) const
Definition GrCaps.cpp:400
virtual bool onCanCopySurface(const GrSurfaceProxy *dst, const SkIRect &dstRect, const GrSurfaceProxy *src, const SkIRect &srcRect) const =0
bool fUsePrimitiveRestart
Definition GrCaps.h:602
virtual bool isFormatRenderable(const GrBackendFormat &format, int sampleCount) const =0
bool fMipmapSupport
Definition GrCaps.h:587
bool fWireframeSupport
Definition GrCaps.h:599
int fInternalMultisampleCount
Definition GrCaps.h:662
bool isFormatCompressed(const GrBackendFormat &format) const
Definition GrCaps.cpp:457
uint32_t fMapBufferFlags
Definition GrCaps.h:654
bool fPerformPartialClearsAsDraws
Definition GrCaps.h:612
bool fReuseScratchBuffers
Definition GrCaps.h:590
virtual SupportedRead onSupportedReadPixelsColorType(GrColorType srcColorType, const GrBackendFormat &srcFormat, GrColorType dstColorType) const =0
bool fWritePixelsRowBytesSupport
Definition GrCaps.h:619
bool fShouldCollapseSrcOverToSrcWhenAble
Definition GrCaps.h:622
bool textureBarrierSupport() const
Definition GrCaps.h:78
bool fPerformColorClearsAsDraws
Definition GrCaps.h:613
bool fAvoidReorderingRenderTasks
Definition GrCaps.h:630
SupportedRead supportedReadPixelsColorType(GrColorType srcColorType, const GrBackendFormat &srcFormat, GrColorType dstColorType) const
Definition GrCaps.cpp:366
virtual bool isFormatAsColorTypeRenderable(GrColorType ct, const GrBackendFormat &format, int sampleCount=1) const =0
virtual bool onSupportsDynamicMSAA(const GrRenderTargetProxy *) const
Definition GrCaps.h:582
bool fNPOTTextureTileSupport
Definition GrCaps.h:586
bool validateSurfaceParams(const SkISize &, const GrBackendFormat &, GrRenderable renderable, int renderTargetSampleCnt, skgpu::Mipmapped, GrTextureType) const
Definition GrCaps.cpp:327
bool fSupportsAHardwareBufferImages
Definition GrCaps.h:609
bool fTransferFromSurfaceToBufferSupport
Definition GrCaps.h:617
bool fMustClearUploadedBufferData
Definition GrCaps.h:606
void finishInitialization(const GrContextOptions &options)
Definition GrCaps.cpp:107
virtual bool onSurfaceSupportsWritePixels(const GrSurface *) const =0
bool canCopySurface(const GrSurfaceProxy *dst, const SkIRect &dstRect, const GrSurfaceProxy *src, const SkIRect &srcRect) const
Definition GrCaps.cpp:309
bool fShouldInitializeTextures
Definition GrCaps.h:608
@ kCanMap_MapFlag
Definition GrCaps.h:199
@ kSubset_MapFlag
Definition GrCaps.h:201
@ kNone_MapFlags
Definition GrCaps.h:197
@ kAsyncRead_MapFlag
Definition GrCaps.h:202
virtual GrBackendFormat onGetDefaultBackendFormat(GrColorType) const =0
bool fAvoidWritePixelsFastPath
Definition GrCaps.h:628
BlendEquationSupport fBlendEquationSupport
Definition GrCaps.h:650
bool fPreferDiscardableMSAAAttachment
Definition GrCaps.h:601
bool msaaResolvesAutomatically() const
Definition GrCaps.h:100
bool fConservativeRasterSupport
Definition GrCaps.h:598
bool fDisableTessellationPathRenderer
Definition GrCaps.h:626
int internalMultisampleCount(const GrBackendFormat &format) const
Definition GrCaps.h:271
bool fUseClientSideIndirectBuffers
Definition GrCaps.h:597
bool fPerformStencilClearsAsDraws
Definition GrCaps.h:615
bool fDrawInstancedSupport
Definition GrCaps.h:595
int fMaxTextureSize
Definition GrCaps.h:660
bool fDisablePerspectiveSDFText
Definition GrCaps.h:632
bool fCrossContextTextureSupport
Definition GrCaps.h:643
bool fPreferFullscreenClears
Definition GrCaps.h:604
bool fAvoidDithering
Definition GrCaps.h:631
skgpu::Swizzle getReadSwizzle(const GrBackendFormat &format, GrColorType colorType) const
Definition GrCaps.cpp:443
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[])
Definition SkString.h:203
static constexpr Swizzle RGBA()
Definition Swizzle.h:66
VkSurfaceKHR surface
Definition main.cc:49
FlutterSemanticsFlag flags
uint32_t uint32_t * format
Renderable
Definition GpuTypes.h:69
Mipmapped
Definition GpuTypes.h:53
void dumpJSON(SkJSONWriter *) const
static constexpr SkIRect MakeSize(const SkISize &size)
Definition SkRect.h:66
bool contains(int32_t x, int32_t y) const
Definition SkRect.h:463
constexpr int32_t width() const
Definition SkSize.h:36
constexpr int32_t height() const
Definition SkSize.h:37