Experimental: Add R_16 and RG_1616 to Ganesh
This is to support the P016 and P010 YUV formats. Initially, only Vulkan and GL support these formats.
Change-Id: Ie9609e59c12528079f8d379359ddb9bac85b6a29
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/218546
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/GrSurfaceContext.cpp b/src/gpu/GrSurfaceContext.cpp
index 2b6987c..d716d39 100644
--- a/src/gpu/GrSurfaceContext.cpp
+++ b/src/gpu/GrSurfaceContext.cpp
@@ -70,6 +70,9 @@
case GrColorType::kRG_F32: return false;
case GrColorType::kRGBA_F32: return true;
case GrColorType::kRGB_ETC1: return false;
+ // Experimental (for P016 and P010)
+ case GrColorType::kR_16: return false;
+ case GrColorType::kRG_1616: return false;
}
SK_ABORT("Invalid GrColorType");
return false;
@@ -103,6 +106,9 @@
case kAlpha_half_as_Red_GrPixelConfig: return false;
case kGray_8_as_Lum_GrPixelConfig: return false;
case kGray_8_as_Red_GrPixelConfig: return false;
+ // Experimental (for P016 and P010)
+ case kR_16_GrPixelConfig: return false;
+ case kRG_1616_GrPixelConfig: return false;
}
SK_ABORT("Invalid GrPixelConfig");
return false;