summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUli Schlachter <psychon@znc.in>2013-10-03 17:44:27 +0200
committerUli Schlachter <psychon@znc.in>2013-10-03 17:44:27 +0200
commit217bed84dda43f018e59a4d9a229f63095e1aa06 (patch)
tree36d31cf4af9885319a479538a659746a5aae02c2
parent592e6a98031cccfae8551bcd86c1f5134726a4f6 (diff)
Revert "[xlib] Fast-path the likely case of retrieving a known xrender_format"
This reverts commit 09a2b2ed3189fe12483cbd673c24ceddc2c20f3f. Back in 2009, _cairo_xlib_display_get_xrender_format() had to acquire a lock to do its job. The above commit added a fast-path which avoided the lock in most cases. However, in 2010 commit f74ad37e66bbdcc4d727ed6d931dde870d84c2f4 modified the locking in the cairo-xlib backend and now this function never takes any locks. Thus, the fast-path that was added a year earlier now just does the same thing that the regular code does and the list of cached formats was checked twice. Reverting the earlier commit fixes this. Signed-off-by: Uli Schlachter <psychon@znc.in>
-rw-r--r--src/cairo-xlib-display.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/cairo-xlib-display.c b/src/cairo-xlib-display.c
index c505db4..4933961 100644
--- a/src/cairo-xlib-display.c
+++ b/src/cairo-xlib-display.c
@@ -491,12 +491,6 @@ _cairo_xlib_display_get_xrender_format (cairo_xlib_display_t *display,
{
XRenderPictFormat *xrender_format;
-#if ! ATOMIC_OP_NEEDS_MEMORY_BARRIER
- xrender_format = display->cached_xrender_formats[format];
- if (likely (xrender_format != NULL))
- return xrender_format;
-#endif
-
xrender_format = display->cached_xrender_formats[format];
if (xrender_format == NULL) {
int pict_format = PictStandardNUM;