mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-27 21:22:26 +00:00
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>
This commit is contained in:
parent
428f2a3f58
commit
18d69fb014
2 changed files with 4 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue