diff options
author | Yahan Zhou <yahan@google.com> | 2018-04-26 21:07:45 +0000 |
---|---|---|
committer | Yahan Zhou <yahan@google.com> | 2018-04-26 14:17:16 -0700 |
commit | 86fbababf749f703a36074566f1cd9a6bc49c6f1 (patch) | |
tree | 7182aa1934e7585a9a24760dec6d4eaea14f79d2 | |
parent | 93eee36521f0e34a823faad4e5570662042baedd (diff) | |
download | device_generic_goldfish-opengl-86fbababf749f703a36074566f1cd9a6bc49c6f1.tar.gz device_generic_goldfish-opengl-86fbababf749f703a36074566f1cd9a6bc49c6f1.tar.bz2 device_generic_goldfish-opengl-86fbababf749f703a36074566f1cd9a6bc49c6f1.zip |
Revert "Handle HAL_PIXEL_FORMAT_RGBX_8888 more appropriately"
This reverts commit 93eee36521f0e34a823faad4e5570662042baedd.
Reason for revert: cause system UI crashes
BUG: 78602661
This cl does not impact real devices.
Change-Id: I0e68902c575c5ce0124173d19dd808613b764967
-rw-r--r-- | system/gralloc/gralloc.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/system/gralloc/gralloc.cpp b/system/gralloc/gralloc.cpp index ddae86a4..9569d344 100644 --- a/system/gralloc/gralloc.cpp +++ b/system/gralloc/gralloc.cpp @@ -510,12 +510,12 @@ static int gralloc_alloc(alloc_device_t* dev, int align = 1; switch (format) { case HAL_PIXEL_FORMAT_RGBA_8888: + case HAL_PIXEL_FORMAT_RGBX_8888: case HAL_PIXEL_FORMAT_BGRA_8888: bpp = 4; glFormat = GL_RGBA; glType = GL_UNSIGNED_BYTE; break; - case HAL_PIXEL_FORMAT_RGBX_8888: case HAL_PIXEL_FORMAT_RGB_888: bpp = 3; glFormat = GL_RGB; @@ -1174,12 +1174,8 @@ static int gralloc_lock(gralloc_module_t const* module, } D("gralloc_lock read back color buffer %d %d ashmem base %p sz %d\n", cb->width, cb->height, cb->ashmemBase, cb->ashmemSize); - GLenum readbackFormat = cb->glFormat; - if (cb->format == HAL_PIXEL_FORMAT_RGBX_8888) { - readbackFormat = GL_RGBA; - } rcEnc->rcReadColorBuffer(rcEnc, cb->hostHandle, - 0, 0, cb->width, cb->height, readbackFormat, cb->glType, rgb_addr); + 0, 0, cb->width, cb->height, cb->glFormat, cb->glType, rgb_addr); if (tmpBuf) { if (cb->frameworkFormat == HAL_PIXEL_FORMAT_YV12) { rgb888_to_yv12((char*)cpu_addr, tmpBuf, cb->width, cb->height, l, t, l+w-1, t+h-1); |