glamor: Move cache_format to glamor_fbo.c, where it's used.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Eric Anholt 2015-07-02 13:52:05 -07:00
parent 0ca783e8ee
commit ab5aa270c7
2 changed files with 15 additions and 15 deletions

View File

@ -70,6 +70,21 @@ cache_hbucket(int size)
return order;
}
static int
cache_format(GLenum format)
{
switch (format) {
case GL_ALPHA:
return 2;
case GL_RGB:
return 1;
case GL_RGBA:
return 0;
default:
return -1;
}
}
static glamor_pixmap_fbo *
glamor_pixmap_fbo_cache_get(glamor_screen_private *glamor_priv,
int w, int h, GLenum format)

View File

@ -824,21 +824,6 @@ format_for_pixmap(PixmapPtr pixmap)
#define SWAP_UPLOADING 2
#define SWAP_NONE_UPLOADING 3
inline static int
cache_format(GLenum format)
{
switch (format) {
case GL_ALPHA:
return 2;
case GL_RGB:
return 1;
case GL_RGBA:
return 0;
default:
return -1;
}
}
/* borrowed from uxa */
static inline Bool
glamor_get_rgba_from_pixel(CARD32 pixel,