~ubuntu-branches/ubuntu/intrepid/cairo/intrepid-updates

« back to all changes in this revision

Viewing changes to src/cairo-xlib-screen.c

  • Committer: Bazaar Package Importer
  • Author(s): Fabien Tassin
  • Date: 2008-09-25 16:22:33 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20080925162233-btx61ymk181i7mcc
Tags: 1.7.6-0ubuntu1
* New upstream version. Most noticable changes are:
  - some API changes with especially the removal of
    cairo_font_options_set_lcd_filter and cairo_font_options_get_lcd_filter
  - xlib: Faster bookkeeping
  - PS: Fix gradients with non-constant alpha
  - Fix deadlock in user-font code
* debian/patches/00list: Remove 03_from_git_fix_lcd_filter_default.dpatch,
  add debian/patches/03_fix_ftbfs_withing_xcb.dpatch
* debian/libcairo2.symbols, debian/libcairo-directfb2.symbols: update
  list of symbols

Show diffs side-by-side

added added

removed removed

Lines of Context:
106
106
                     const char *option,
107
107
                     int        *value)
108
108
{
109
 
    int i;
110
109
    char *v, *e;
111
110
 
112
111
    v = XGetDefault (dpy, "Xft", option);
116
115
            return TRUE;
117
116
#endif
118
117
 
119
 
        i = strtol (v, &e, 0);
 
118
        *value = strtol (v, &e, 0);
120
119
        if (e != v)
121
120
            return TRUE;
122
121
    }
136
135
#ifndef FC_LCD_FILTER
137
136
#define FC_LCD_FILTER   "lcdfilter"
138
137
#endif
139
 
/* Stupid Ubuntu defined FC_LCD_FILTER without defining the following */
 
138
/* Some Ubuntu versions defined FC_LCD_FILTER without defining the following */
140
139
#ifndef FC_LCD_NONE
141
140
#define FC_LCD_NONE     0
142
141
#define FC_LCD_DEFAULT  1
279
278
    cairo_font_options_set_hint_style (&info->font_options, hint_style);
280
279
    cairo_font_options_set_antialias (&info->font_options, antialias);
281
280
    cairo_font_options_set_subpixel_order (&info->font_options, subpixel_order);
282
 
    cairo_font_options_set_lcd_filter (&info->font_options, lcd_filter);
 
281
    _cairo_font_options_set_lcd_filter (&info->font_options, lcd_filter);
283
282
    cairo_font_options_set_hint_metrics (&info->font_options, CAIRO_HINT_METRICS_ON);
284
283
}
285
284
 
347
346
}
348
347
 
349
348
cairo_xlib_screen_info_t *
350
 
_cairo_xlib_screen_info_get (Display *dpy, Screen *screen)
 
349
_cairo_xlib_screen_info_get (cairo_xlib_display_t *display, Screen *screen)
351
350
{
352
 
    cairo_xlib_display_t *display;
353
351
    cairo_xlib_screen_info_t *info = NULL, **prev;
354
352
 
355
 
    display = _cairo_xlib_display_get (dpy);
356
 
    if (display == NULL)
357
 
        return NULL;
358
 
 
359
353
    CAIRO_MUTEX_LOCK (display->mutex);
360
354
    if (display->closed) {
361
355
        CAIRO_MUTEX_UNLOCK (display->mutex);
362
 
        goto DONE;
 
356
        return NULL;
363
357
    }
364
358
 
365
359
    for (prev = &display->screens; (info = *prev); prev = &(*prev)->next) {
395
389
                               sizeof (cairo_xlib_visual_info_t*));
396
390
 
397
391
            if (screen) {
 
392
                Display *dpy = display->display;
398
393
                int event_base, error_base;
 
394
 
399
395
                info->has_render = (XRenderQueryExtension (dpy, &event_base, &error_base) &&
400
396
                        (XRenderFindVisualFormat (dpy, DefaultVisual (dpy, DefaultScreen (dpy))) != 0));
401
397
                _cairo_xlib_init_screen_font_options (dpy, info);
408
404
        }
409
405
    }
410
406
 
411
 
DONE:
412
 
    _cairo_xlib_display_destroy (display);
413
 
 
414
407
    return info;
415
408
}
416
409