summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2015-07-02 13:52:05 -0700
committerEric Anholt <eric@anholt.net>2015-07-10 09:42:58 -0700
commitab5aa270c79d70f095bc7abadeef227b4062027c (patch)
tree4730b27cd00b9145a67ab11a6bd8ac314e6c5dc2
parent0ca783e8ee5dfb086fbfa64d26173bcca78b4010 (diff)
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>
-rw-r--r--glamor/glamor_fbo.c15
-rw-r--r--glamor/glamor_utils.h15
2 files changed, 15 insertions, 15 deletions
diff --git a/glamor/glamor_fbo.c b/glamor/glamor_fbo.c
index 1eee304ed..262033f6b 100644
--- a/glamor/glamor_fbo.c
+++ b/glamor/glamor_fbo.c
@@ -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)
diff --git a/glamor/glamor_utils.h b/glamor/glamor_utils.h
index e22bbc1a4..8a96c6174 100644
--- a/glamor/glamor_utils.h
+++ b/glamor/glamor_utils.h
@@ -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,