diff options
author | Zhigang Gong <zhigang.gong@linux.intel.com> | 2012-04-13 13:47:05 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@linux.intel.com> | 2012-04-13 13:47:05 +0800 |
commit | 8b7884a70143497e36fdc28cbe05b1305a7b0be8 (patch) | |
tree | 9b4977dbd92b3a3b230abdadba02c0ae32ba0ab3 | |
parent | 609b5ff3ae35ed453b17bf561f6ecb23deec4a62 (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>
-rw-r--r-- | src/glamor_priv.h | 2 | ||||
-rw-r--r-- | src/glamor_utils.h | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/glamor_priv.h b/src/glamor_priv.h index f89632c..961af47 100644 --- a/src/glamor_priv.h +++ b/src/glamor_priv.h @@ -185,7 +185,7 @@ struct glamor_saved_procs { #ifdef GLAMOR_GLES2 #define CACHE_FORMAT_COUNT 3 #else -#define CACHE_FORMAT_COUNT 1 +#define CACHE_FORMAT_COUNT 2 #endif #define CACHE_BUCKET_WCOUNT 4 diff --git a/src/glamor_utils.h b/src/glamor_utils.h index 972918c..da05143 100644 --- a/src/glamor_utils.h +++ b/src/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: |