Commit 17139651 authored by Chris Blume's avatar Chris Blume Committed by Commit Bot

Fix wide color gamut on Pixel 4

The Pixel 4 has wide color gamut enabled. However, a CL [1] accidentally
caused the Pixel 4 to look muddy. This was because it no longer set the
color space on the texture.

For Android, when using the scanout usage for shared images, we always
use the AHardwareBuffer backing. The GL backing was setting the color
space, but the AHardwareBuffer backing was not. And in our wide color
situation, those shared images were using scanout.

This CL sets the color space of a shared image with AHardwareBuffer
backing.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/1977969

Bug: 955158
Change-Id: Id811457e6198ba2b9cbe9667817edc385aa5ef4b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2065430Reviewed-by: default avatarKhushal <khushalsagar@chromium.org>
Reviewed-by: default avatarvikas soni <vikassoni@chromium.org>
Commit-Queue: Chris Blume <cblume@chromium.org>
Cr-Commit-Position: refs/heads/master@{#742897}
parent c9f0ebf0
...@@ -822,6 +822,7 @@ gles2::Texture* SharedImageBackingAHB::GenGLTexture() { ...@@ -822,6 +822,7 @@ gles2::Texture* SharedImageBackingAHB::GenGLTexture() {
api->glDeleteTexturesFn(1, &service_id); api->glDeleteTexturesFn(1, &service_id);
return nullptr; return nullptr;
} }
egl_image->SetColorSpace(color_space());
// Create a gles2 Texture. // Create a gles2 Texture.
auto* texture = new gles2::Texture(service_id); auto* texture = new gles2::Texture(service_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment