summaryrefslogtreecommitdiff
path: root/glamor/glamor_utils.h
diff options
context:
space:
mode:
authorZhigang Gong <zhigang.gong@linux.intel.com>2012-04-27 15:34:15 +0800
committerEric Anholt <eric@anholt.net>2013-12-18 11:23:51 -0800
commit9dfd10dc75efdf4c26b7ff46b55e4a2d2453803b (patch)
tree97b3962432473360a0d5a50f30b8ce6907c9311b /glamor/glamor_utils.h
parent9fcd123aed80430b220fc4141eaa3723d7cb611e (diff)
glamor_render: Fix the repeat none for GLES2.
As GLES2 doesn't support clamp to the border, we have to handle it seprately from the normal case. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'glamor/glamor_utils.h')
-rw-r--r--glamor/glamor_utils.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/glamor/glamor_utils.h b/glamor/glamor_utils.h
index c46849090..f39e3a532 100644
--- a/glamor/glamor_utils.h
+++ b/glamor/glamor_utils.h
@@ -18,6 +18,17 @@
*(_pyscale_) = 1.0 / (_pixmap_priv_)->fbo->height; \
} while(0)
+#define GLAMOR_PIXMAP_FBO_NOT_EAXCT_SIZE(priv) \
+ (priv->fbo->width != priv->container->drawable.width \
+ || priv->fbo->height != priv->container->drawable.height)
+
+#define glamor_pixmap_fbo_fix_wh_ratio(wh, priv) do { \
+ wh[0] = (float)priv->fbo->width \
+ / priv->container->drawable.width; \
+ wh[1] = (float)priv->fbo->height \
+ / priv->container->drawable.height; \
+ } while(0)
+
#define xFixedToFloat(_val_) ((float)xFixedToInt(_val_) \
+ ((float)xFixedFrac(_val_) / 65536.0))