diff options
author | Dan Stoza <stoza@google.com> | 2014-01-07 15:25:02 -0800 |
---|---|---|
committer | Dan Stoza <stoza@google.com> | 2014-01-07 16:43:39 -0800 |
commit | 6a5d35dd5cd8710c6c9f100076e62ffbdb0b868b (patch) | |
tree | 15b644f162a49a4791fd8953a002caa5e6dcc378 /libs/ui | |
parent | 524672571f1df138eb913e672aaa74e0257aa8c0 (diff) | |
download | frameworks_native-6a5d35dd5cd8710c6c9f100076e62ffbdb0b868b.zip frameworks_native-6a5d35dd5cd8710c6c9f100076e62ffbdb0b868b.tar.gz frameworks_native-6a5d35dd5cd8710c6c9f100076e62ffbdb0b868b.tar.bz2 |
libgui: Add a test for SRGB surfaces
Add SRGBTest.RenderToSRGBSurface, which validates that passing the
SRGB colorspace attributes to eglCreateWindowSurface actually
results in an SRGB surface by comparing the output values to those
of a standard RGB surface.
Change-Id: I3d5fef8070ed8fa2357ddd1c5fcc849ae3fbd12a
Diffstat (limited to 'libs/ui')
-rw-r--r-- | libs/ui/PixelFormat.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/ui/PixelFormat.cpp b/libs/ui/PixelFormat.cpp index d2d103a..5ce7fba 100644 --- a/libs/ui/PixelFormat.cpp +++ b/libs/ui/PixelFormat.cpp @@ -26,6 +26,8 @@ ssize_t bytesPerPixel(PixelFormat format) { case PIXEL_FORMAT_RGBA_8888: case PIXEL_FORMAT_RGBX_8888: case PIXEL_FORMAT_BGRA_8888: + case PIXEL_FORMAT_sRGB_A_8888: + case PIXEL_FORMAT_sRGB_X_8888: return 4; case PIXEL_FORMAT_RGB_888: return 3; |