diff options
author | Zhigang Gong <zhigang.gong@linux.intel.com> | 2012-04-13 13:47:05 +0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2013-12-18 11:23:50 -0800 |
commit | 18d69fb0142088f7df230ec876c7ce2b55a41ad9 (patch) | |
tree | 40064c9aa19f4d879ebc7936361ff25c4334b812 /glamor/glamor_utils.h | |
parent | 428f2a3f58a91300835aaa083ac0b291ce394dd0 (diff) |
glamor_gl: Use GL_ALPHA for depth 8 pixmap.
Use GL_RGBA to represent a8 pixmap is not efficient.
Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'glamor/glamor_utils.h')
-rw-r--r-- | glamor/glamor_utils.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/glamor/glamor_utils.h b/glamor/glamor_utils.h index 972918c08..da05143cf 100644 --- a/glamor/glamor_utils.h +++ b/glamor/glamor_utils.h @@ -257,10 +257,10 @@ static inline void gl_iformat_for_depth(int depth, GLenum * format) { switch (depth) { -#if 0 case 8: *format = GL_ALPHA; break; +#if 0 case 24: *format = GL_RGB; break; @@ -411,6 +411,8 @@ glamor_get_tex_format_type_from_pictformat(PictFormatShort format, inline static int cache_format(GLenum format) { switch (format) { + case GL_ALPHA: + return 1; case GL_RGBA: return 0; default: |