Lines Matching defs:format
308 bool GrCaps::validateSurfaceParams(const SkISize& dimensions, const GrBackendFormat& format,
312 if (!this->isFormatTexturable(format, textureType)) {
326 if (!this->isFormatRenderable(format, renderTargetSampleCnt)) {
383 // Unknown color types are always an invalid format, so early out before calling virtual.
388 auto format = this->onGetDefaultBackendFormat(colorType);
389 if (!this->isFormatTexturable(format, GrTextureType::k2D)) {
392 if (!this->areColorTypeAndFormatCompatible(colorType, format)) {
395 // Currently we require that it be possible to write pixels into the "default" format. Perhaps,
398 if (this->supportedWritePixelsColorType(colorType, format, colorType).fColorType ==
403 !this->isFormatAsColorTypeRenderable(colorType, format)) {
406 return format;
410 const GrBackendFormat& format) const {
415 SkImage::CompressionType compression = GrBackendFormatToCompressionType(format);
421 return this->onAreColorTypeAndFormatCompatible(grCT, format);
424 GrSwizzle GrCaps::getReadSwizzle(const GrBackendFormat& format, GrColorType colorType) const {
425 SkImage::CompressionType compression = GrBackendFormatToCompressionType(format);
430 SkDEBUGFAILF("Illegal color type (%d) and compressed format (%d) combination.",
435 return this->onGetReadSwizzle(format, colorType);
438 bool GrCaps::isFormatCompressed(const GrBackendFormat& format) const {
439 return GrBackendFormatToCompressionType(format) != SkImage::CompressionType::kNone;
483 auto format = this->getDefaultBackendFormat(ct, GrRenderable::kYes);
484 // We continue to the fallback color type if there no default renderable format or we
485 // requested msaa and the format doesn't support msaa.
486 if (format.isValid() && this->isFormatRenderable(format, sampleCnt)) {
487 return {ct, format};