diff options
| author | 2016-02-11 13:22:25 -0800 | |
|---|---|---|
| committer | 2016-02-11 13:22:25 -0800 | |
| commit | 1d4e6a0901e5d26f4319ed173b4aa7b907350d93 (patch) | |
| tree | a2fdd7b8fa4f348911779fbcc047ef13910d4063 /libs/hwui/Texture.cpp | |
| parent | 186b54397a1cdfbf4cd97f2ce997c9537f41d3ed (diff) | |
Fix bpp mismatch
Bug: 26980851
GL_RGBA16F was being incorrectly calculated
as 4 bpp instead of 16 in Texture's objectSize(),
leading to a mismatch in cache size tracking
in GradientCache
Change-Id: I533c52fcdf9910d7a7d14bbd80965b8cbef8e147
Diffstat (limited to 'libs/hwui/Texture.cpp')
| -rw-r--r-- | libs/hwui/Texture.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/hwui/Texture.cpp b/libs/hwui/Texture.cpp index c09b6dd89e4e..49a103c01108 100644 --- a/libs/hwui/Texture.cpp +++ b/libs/hwui/Texture.cpp @@ -33,8 +33,11 @@ static int bytesPerPixel(GLint glFormat) { case GL_RGB: return 3; case GL_RGBA: - default: return 4; + case GL_RGBA16F: + return 16; + default: + LOG_ALWAYS_FATAL("UNKNOWN FORMAT %d", glFormat); } } |