Reland: Support host decoding with update_color_buffer on minigbm
minigbm creates an NV12 image when the guest wanted yuv_420_888. our
host decoder outputs yuv_420_888, but this isn't compatible with nv21,
and resulted in garbled images when fed to YUVConverter.
but gfxstream never created a yuv_420_888 gpu image on the host anyway. All
we need to do is explicitly tell YUVConverter to convert from yuv_420_888.
Bug: 162770284
Change-Id: I3788183e7c94adfd0d52caafbbe67a1ed0d23c77
diff --git a/stream-servers/gl/YUVConverter.h b/stream-servers/gl/YUVConverter.h
index eebeb4c..8cddee1 100644
--- a/stream-servers/gl/YUVConverter.h
+++ b/stream-servers/gl/YUVConverter.h
@@ -63,6 +63,8 @@
// the host color buffer
// (rcUpdateColorBuffer)
void drawConvert(int x, int y, int width, int height, const char* pixels);
+ void drawConvertFromFormat(FrameworkFormat format, int x, int y, int width, int height,
+ const char* pixels);
uint32_t getDataSize();
// read YUV data into pixels, exactly pixels_size bytes;
@@ -101,6 +103,7 @@
GLuint mTextureY = 0;
GLuint mTextureU = 0;
GLuint mTextureV = 0;
+ bool mTexturesSwapped = false;
GLint mUniformLocYWidthCutoff = -1;
GLint mUniformLocUVWidthCutoff = -1;
GLint mUniformLocSamplerY = -1;