diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkCanvas.cpp | 2 | ||||
-rw-r--r-- | src/core/SkGpuBlurUtils.cpp | 3 | ||||
-rw-r--r-- | src/gpu/GrCaps.cpp | 1 | ||||
-rw-r--r-- | src/gpu/GrContext.cpp | 25 | ||||
-rw-r--r-- | src/gpu/SkGpuDevice.cpp | 10 | ||||
-rw-r--r-- | src/gpu/SkGr.cpp | 5 | ||||
-rw-r--r-- | src/gpu/effects/GrDitherEffect.fp | 1 | ||||
-rw-r--r-- | src/gpu/effects/GrDitherEffect.h | 1 | ||||
-rw-r--r-- | src/gpu/gl/GrGLCaps.cpp | 24 | ||||
-rw-r--r-- | src/gpu/gl/GrGLDefines.h | 2 | ||||
-rw-r--r-- | src/gpu/gl/GrGLGpu.cpp | 1 | ||||
-rw-r--r-- | src/gpu/gl/GrGLUtil.cpp | 2 | ||||
-rw-r--r-- | src/gpu/mtl/GrMtlUtil.mm | 7 | ||||
-rw-r--r-- | src/gpu/vk/GrVkCaps.cpp | 5 | ||||
-rw-r--r-- | src/gpu/vk/GrVkUtil.cpp | 8 |
15 files changed, 18 insertions, 79 deletions
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index 34b9d369ec..269fac6f31 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -2880,7 +2880,6 @@ int SkCanvas::LayerIter::y() const { return fImpl->getY(); } /////////////////////////////////////////////////////////////////////////////// -// TODO: This still disagrees with SkSurfaceValidateRasterInfo static bool supported_for_raster_canvas(const SkImageInfo& info) { switch (info.alphaType()) { case kPremul_SkAlphaType: @@ -2895,7 +2894,6 @@ static bool supported_for_raster_canvas(const SkImageInfo& info) { case kRGB_565_SkColorType: case kN32_SkColorType: case kRGBA_F16_SkColorType: - case kRGBA_1010102_SkColorType: break; default: return false; diff --git a/src/core/SkGpuBlurUtils.cpp b/src/core/SkGpuBlurUtils.cpp index 755e8daf70..7fa05454d0 100644 --- a/src/core/SkGpuBlurUtils.cpp +++ b/src/core/SkGpuBlurUtils.cpp @@ -235,8 +235,7 @@ sk_sp<GrRenderTargetContext> GaussianBlur(GrContext* context, SkASSERT(kBGRA_8888_GrPixelConfig == config || kRGBA_8888_GrPixelConfig == config || kRGBA_4444_GrPixelConfig == config || kRGB_565_GrPixelConfig == config || kSRGBA_8888_GrPixelConfig == config || kSBGRA_8888_GrPixelConfig == config || - kRGBA_half_GrPixelConfig == config || kAlpha_8_GrPixelConfig == config || - kRGBA_1010102_GrPixelConfig == config); + kRGBA_half_GrPixelConfig == config || kAlpha_8_GrPixelConfig == config); const int width = dstBounds.width(); const int height = dstBounds.height(); diff --git a/src/gpu/GrCaps.cpp b/src/gpu/GrCaps.cpp index 37c31001d1..8cfbc5faea 100644 --- a/src/gpu/GrCaps.cpp +++ b/src/gpu/GrCaps.cpp @@ -27,7 +27,6 @@ static const char* pixel_config_name(GrPixelConfig config) { case kBGRA_8888_GrPixelConfig: return "BGRA8888"; case kSRGBA_8888_GrPixelConfig: return "SRGBA8888"; case kSBGRA_8888_GrPixelConfig: return "SBGRA8888"; - case kRGBA_1010102_GrPixelConfig: return "RGBA1010102"; case kRGBA_float_GrPixelConfig: return "RGBAFloat"; case kRG_float_GrPixelConfig: return "RGFloat"; case kAlpha_half_GrPixelConfig: return "AlphaHalf"; diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index ee623678bf..7cca4a44ad 100644 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -623,7 +623,6 @@ static bool valid_premul_config(GrPixelConfig config) { case kBGRA_8888_GrPixelConfig: return true; case kSRGBA_8888_GrPixelConfig: return true; case kSBGRA_8888_GrPixelConfig: return true; - case kRGBA_1010102_GrPixelConfig: return true; case kRGBA_float_GrPixelConfig: return true; case kRG_float_GrPixelConfig: return false; case kAlpha_half_GrPixelConfig: return false; @@ -640,18 +639,17 @@ static bool valid_premul_config(GrPixelConfig config) { static bool valid_premul_color_type(GrColorType ct) { switch (ct) { - case GrColorType::kUnknown: return false; - case GrColorType::kAlpha_8: return false; - case GrColorType::kRGB_565: return false; - case GrColorType::kABGR_4444: return true; - case GrColorType::kRGBA_8888: return true; - case GrColorType::kBGRA_8888: return true; - case GrColorType::kRGBA_1010102: return true; - case GrColorType::kGray_8: return false; - case GrColorType::kAlpha_F16: return false; - case GrColorType::kRGBA_F16: return true; - case GrColorType::kRG_F32: return false; - case GrColorType::kRGBA_F32: return true; + case GrColorType::kUnknown: return false; + case GrColorType::kAlpha_8: return false; + case GrColorType::kRGB_565: return false; + case GrColorType::kABGR_4444: return true; + case GrColorType::kRGBA_8888: return true; + case GrColorType::kBGRA_8888: return true; + case GrColorType::kGray_8: return false; + case GrColorType::kAlpha_F16: return false; + case GrColorType::kRGBA_F16: return true; + case GrColorType::kRG_F32: return false; + case GrColorType::kRGBA_F32: return true; } SK_ABORT("Invalid GrColorType"); return false; @@ -1316,7 +1314,6 @@ static inline GrPixelConfig GrPixelConfigFallback(GrPixelConfig config) { case kRGB_565_GrPixelConfig: case kRGBA_4444_GrPixelConfig: case kBGRA_8888_GrPixelConfig: - case kRGBA_1010102_GrPixelConfig: return kRGBA_8888_GrPixelConfig; case kSBGRA_8888_GrPixelConfig: return kSRGBA_8888_GrPixelConfig; diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index 2722292506..1a4538af72 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp @@ -1713,15 +1713,9 @@ SkBaseDevice* SkGpuDevice::onCreateDevice(const CreateInfo& cinfo, const SkPaint SkBackingFit fit = kNever_TileUsage == cinfo.fTileUsage ? SkBackingFit::kApprox : SkBackingFit::kExact; - GrPixelConfig config = fRenderTargetContext->colorSpaceInfo().config(); - if (kRGBA_1010102_GrPixelConfig == config) { - // If the original device is 1010102, fall back to 8888 so that we have a usable alpha - // channel in the layer. - config = kRGBA_8888_GrPixelConfig; - } - sk_sp<GrRenderTargetContext> rtc(fContext->makeDeferredRenderTargetContext( - fit, cinfo.fInfo.width(), cinfo.fInfo.height(), config, + fit, cinfo.fInfo.width(), cinfo.fInfo.height(), + fRenderTargetContext->colorSpaceInfo().config(), fRenderTargetContext->colorSpaceInfo().refColorSpace(), fRenderTargetContext->numStencilSamples(), GrMipMapped::kNo, kBottomLeft_GrSurfaceOrigin, &props)); diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp index 095a867605..37e4c8f430 100644 --- a/src/gpu/SkGr.cpp +++ b/src/gpu/SkGr.cpp @@ -264,7 +264,7 @@ GrPixelConfig SkImageInfo2GrPixelConfig(const SkColorType type, SkColorSpace* cs return (caps.srgbSupport() && cs && cs->gammaCloseToSRGB()) ? kSBGRA_8888_GrPixelConfig : kBGRA_8888_GrPixelConfig; case kRGBA_1010102_SkColorType: - return kRGBA_1010102_GrPixelConfig; + return kUnknown_GrPixelConfig; case kRGB_101010x_SkColorType: return kUnknown_GrPixelConfig; case kGray_8_SkColorType: @@ -311,9 +311,6 @@ bool GrPixelConfigToColorType(GrPixelConfig config, SkColorType* ctOut) { case kSBGRA_8888_GrPixelConfig: ct = kBGRA_8888_SkColorType; break; - case kRGBA_1010102_GrPixelConfig: - ct = kRGBA_1010102_SkColorType; - break; case kRGBA_half_GrPixelConfig: ct = kRGBA_F16_SkColorType; break; diff --git a/src/gpu/effects/GrDitherEffect.fp b/src/gpu/effects/GrDitherEffect.fp index 7cf07da311..8ae323e089 100644 --- a/src/gpu/effects/GrDitherEffect.fp +++ b/src/gpu/effects/GrDitherEffect.fp @@ -28,7 +28,6 @@ layout(key) in int rangeType; rangeType = 2; break; case kUnknown_GrPixelConfig: - case kRGBA_1010102_GrPixelConfig: case kAlpha_half_GrPixelConfig: case kAlpha_half_as_Red_GrPixelConfig: case kRGBA_float_GrPixelConfig: diff --git a/src/gpu/effects/GrDitherEffect.h b/src/gpu/effects/GrDitherEffect.h index 2e650a68f4..c614982538 100644 --- a/src/gpu/effects/GrDitherEffect.h +++ b/src/gpu/effects/GrDitherEffect.h @@ -37,7 +37,6 @@ public: rangeType = 2; break; case kUnknown_GrPixelConfig: - case kRGBA_1010102_GrPixelConfig: case kAlpha_half_GrPixelConfig: case kAlpha_half_as_Red_GrPixelConfig: case kRGBA_float_GrPixelConfig: diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index 487b17d095..9068525148 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -1603,25 +1603,6 @@ void GrGLCaps::initConfigTable(const GrContextOptions& contextOptions, } fConfigTable[kRGBA_4444_GrPixelConfig].fSwizzle = GrSwizzle::RGBA(); - fConfigTable[kRGBA_1010102_GrPixelConfig].fFormats.fBaseInternalFormat = GR_GL_RGBA; - fConfigTable[kRGBA_1010102_GrPixelConfig].fFormats.fSizedInternalFormat = GR_GL_RGB10_A2; - fConfigTable[kRGBA_1010102_GrPixelConfig].fFormats.fExternalFormat[kOther_ExternalFormatUsage] = - GR_GL_RGBA; - fConfigTable[kRGBA_1010102_GrPixelConfig].fFormats.fExternalType = - GR_GL_UNSIGNED_INT_2_10_10_10_REV; - fConfigTable[kRGBA_1010102_GrPixelConfig].fFormatType = kNormalizedFixedPoint_FormatType; - if (kGL_GrGLStandard == standard || version >= GR_GL_VER(3, 0)) { - fConfigTable[kRGBA_1010102_GrPixelConfig].fFlags = ConfigInfo::kTextureable_Flag | - allRenderFlags; - } - if (texStorageSupported) { - fConfigTable[kRGBA_1010102_GrPixelConfig].fFlags |= ConfigInfo::kCanUseTexStorage_Flag; - } - if (texelBufferSupport) { - fConfigTable[kRGBA_1010102_GrPixelConfig].fFlags |= ConfigInfo::kCanUseWithTexelBuffer_Flag; - } - fConfigTable[kRGBA_1010102_GrPixelConfig].fSwizzle = GrSwizzle::RGBA(); - bool alpha8IsValidForGL = kGL_GrGLStandard == standard && (!fIsCoreProfile || version <= GR_GL_VER(3, 0)); @@ -2530,10 +2511,7 @@ bool validate_sized_format(GrGLenum format, SkColorType ct, GrPixelConfig* confi } break; case kRGBA_1010102_SkColorType: - if (GR_GL_RGB10_A2 == format) { - *config = kRGBA_1010102_GrPixelConfig; - } - break; + return false; case kRGB_101010x_SkColorType: return false; case kGray_8_SkColorType: diff --git a/src/gpu/gl/GrGLDefines.h b/src/gpu/gl/GrGLDefines.h index e5e74eb68e..9da060b412 100644 --- a/src/gpu/gl/GrGLDefines.h +++ b/src/gpu/gl/GrGLDefines.h @@ -508,7 +508,6 @@ #define GR_GL_RGBA4 0x8056 #define GR_GL_RGB5_A1 0x8057 #define GR_GL_RGBA8 0x8058 -#define GR_GL_RGB10_A2 0x8059 #define GR_GL_SRGB8_ALPHA8 0x8C43 #define GR_GL_RGBA16F 0x881A #define GR_GL_RGBA32F 0x8814 @@ -530,7 +529,6 @@ #define GR_GL_UNSIGNED_SHORT_4_4_4_4 0x8033 #define GR_GL_UNSIGNED_SHORT_5_5_5_1 0x8034 #define GR_GL_UNSIGNED_SHORT_5_6_5 0x8363 -#define GR_GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 /* Shaders */ #define GR_GL_FRAGMENT_SHADER 0x8B30 diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp index a571f5a81e..af7c4706d3 100644 --- a/src/gpu/gl/GrGLGpu.cpp +++ b/src/gpu/gl/GrGLGpu.cpp @@ -800,7 +800,6 @@ static inline GrGLint config_alignment(GrPixelConfig config) { case kBGRA_8888_GrPixelConfig: case kSRGBA_8888_GrPixelConfig: case kSBGRA_8888_GrPixelConfig: - case kRGBA_1010102_GrPixelConfig: case kRGBA_float_GrPixelConfig: case kRG_float_GrPixelConfig: return 4; diff --git a/src/gpu/gl/GrGLUtil.cpp b/src/gpu/gl/GrGLUtil.cpp index 6b44402c1b..791d9ecfcb 100644 --- a/src/gpu/gl/GrGLUtil.cpp +++ b/src/gpu/gl/GrGLUtil.cpp @@ -504,8 +504,6 @@ GrPixelConfig GrGLSizedFormatToPixelConfig(GrGLenum sizedFormat) { return kRGB_565_GrPixelConfig; case GR_GL_RGBA4: return kRGBA_4444_GrPixelConfig; - case GR_GL_RGB10_A2: - return kRGBA_1010102_GrPixelConfig; case GR_GL_LUMINANCE8: return kGray_8_GrPixelConfig; case GR_GL_RGBA32F: diff --git a/src/gpu/mtl/GrMtlUtil.mm b/src/gpu/mtl/GrMtlUtil.mm index 383cc98264..a188afe4ad 100644 --- a/src/gpu/mtl/GrMtlUtil.mm +++ b/src/gpu/mtl/GrMtlUtil.mm @@ -30,12 +30,9 @@ bool GrPixelConfigToMTLFormat(GrPixelConfig config, MTLPixelFormat* format) { case kSBGRA_8888_GrPixelConfig: *format = MTLPixelFormatBGRA8Unorm_sRGB; return true; - case kRGBA_1010102_GrPixelConfig: - *format = MTLPixelFormatRGB10A2Unorm; - return true; case kRGB_565_GrPixelConfig: #ifdef SK_BUILD_FOR_IOS - *format = MTLPixelFormatB5G6R5Unorm; + *format = MTLPixelFormatR5G6B5Unorm; return true; #else return false; @@ -87,8 +84,6 @@ GrPixelConfig GrMTLFormatToPixelConfig(MTLPixelFormat format) { return kSRGBA_8888_GrPixelConfig; case MTLPixelFormatBGRA8Unorm_sRGB: return kSBGRA_8888_GrPixelConfig; - case MTLPixelFormatRGB10A2Unorm: - return kRGBA_1010102_GrPixelConfig; #ifdef SK_BUILD_FOR_IOS case MTLPixelFormatB5G6R5Unorm: return kRGB_565_GrPixelConfig; diff --git a/src/gpu/vk/GrVkCaps.cpp b/src/gpu/vk/GrVkCaps.cpp index 40a0eb5e3f..649f68b61b 100644 --- a/src/gpu/vk/GrVkCaps.cpp +++ b/src/gpu/vk/GrVkCaps.cpp @@ -485,10 +485,7 @@ bool validate_image_info(VkFormat format, SkColorType ct, GrPixelConfig* config) } break; case kRGBA_1010102_SkColorType: - if (VK_FORMAT_A2B10G10R10_UNORM_PACK32 == format) { - *config = kRGBA_1010102_GrPixelConfig; - } - break; + return false; case kRGB_101010x_SkColorType: return false; case kGray_8_SkColorType: diff --git a/src/gpu/vk/GrVkUtil.cpp b/src/gpu/vk/GrVkUtil.cpp index 4f0acdb8f4..330a1de7a2 100644 --- a/src/gpu/vk/GrVkUtil.cpp +++ b/src/gpu/vk/GrVkUtil.cpp @@ -31,9 +31,6 @@ bool GrPixelConfigToVkFormat(GrPixelConfig config, VkFormat* format) { case kSBGRA_8888_GrPixelConfig: *format = VK_FORMAT_B8G8R8A8_SRGB; return true; - case kRGBA_1010102_GrPixelConfig: - *format = VK_FORMAT_A2B10G10R10_UNORM_PACK32; - return true; case kRGB_565_GrPixelConfig: *format = VK_FORMAT_R5G6B5_UNORM_PACK16; return true; @@ -82,8 +79,6 @@ GrPixelConfig GrVkFormatToPixelConfig(VkFormat format) { return kSRGBA_8888_GrPixelConfig; case VK_FORMAT_B8G8R8A8_SRGB: return kSBGRA_8888_GrPixelConfig; - case VK_FORMAT_A2B10G10R10_UNORM_PACK32: - return kRGBA_1010102_GrPixelConfig; case VK_FORMAT_R5G6B5_UNORM_PACK16: return kRGB_565_GrPixelConfig; break; @@ -116,8 +111,6 @@ bool GrVkFormatPixelConfigPairIsValid(VkFormat format, GrPixelConfig config) { return kSRGBA_8888_GrPixelConfig == config; case VK_FORMAT_B8G8R8A8_SRGB: return kSBGRA_8888_GrPixelConfig == config; - case VK_FORMAT_A2B10G10R10_UNORM_PACK32: - return kRGBA_1010102_GrPixelConfig == config; case VK_FORMAT_R5G6B5_UNORM_PACK16: return kRGB_565_GrPixelConfig == config; case VK_FORMAT_B4G4R4A4_UNORM_PACK16: @@ -150,7 +143,6 @@ bool GrVkFormatIsSupported(VkFormat format) { case VK_FORMAT_R8G8B8A8_SRGB: case VK_FORMAT_B8G8R8A8_SRGB: case VK_FORMAT_R8G8B8A8_SINT: - case VK_FORMAT_A2B10G10R10_UNORM_PACK32: case VK_FORMAT_R5G6B5_UNORM_PACK16: case VK_FORMAT_B4G4R4A4_UNORM_PACK16: case VK_FORMAT_R8_UNORM: |