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:
parent
0ca783e8ee
commit
ab5aa270c7
|
@ -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)
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user