Add Ganesh support for RGBA_16161616 and RG_half
Change-Id: Ia424ff719c5fb8d1842a909ade09ad6f5f78f21f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/219998
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/gl/GrGLUtil.cpp b/src/gpu/gl/GrGLUtil.cpp
index f50932e..b1f989c 100644
--- a/src/gpu/gl/GrGLUtil.cpp
+++ b/src/gpu/gl/GrGLUtil.cpp
@@ -612,6 +612,7 @@
case GR_GL_RGBA4:
case GR_GL_RG8:
case GR_GL_R16F:
+ case GR_GL_R16:
return 2;
case GR_GL_RGB8:
@@ -621,6 +622,7 @@
case GR_GL_SRGB8_ALPHA8:
case GR_GL_BGRA8:
case GR_GL_RGB10_A2:
+ case GR_GL_RG16:
return 4;
case GR_GL_RGBA16F:
@@ -634,11 +636,11 @@
case GR_GL_COMPRESSED_ETC1_RGB8:
return 0;
- // Experimental (for P016 and P010)
- case GR_GL_R16:
- return 2;
- case GR_GL_RG16:
+ // Experimental (for Y416 and mutant P016/P010)
+ case GR_GL_RG16F:
return 4;
+ case GR_GL_RGBA16:
+ return 8;
}
SK_ABORT("Invalid GL format");