Add Ganesh support for RGBA_16161616 and RG_half (take 2)
TBR=egdaniel@google.com
Bug: skia:9171
Change-Id: I862c87ba4bd55381b347333cf9ca23cf5389dff6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/220816
Reviewed-by: Robert Phillips <robertphillips@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");