equal
deleted
inserted
replaced
|
1 This enables tracking of ARGB values for image masks, since some machines do |
|
2 not use ARGB values. |
|
3 See Mozilla bug #716462 - Performance regression with xBGR visual and no |
|
4 RENDER extension. |
|
5 We would like to try to get this upstream in the future. |
|
6 |
|
7 --- mozilla-esr31/gfx/cairo/cairo/src/cairo-xlib-surface.c.orig 2015-06-04 17:42:51.419088049 -0700 |
|
8 +++ mozilla-esr31/gfx/cairo/cairo/src/cairo-xlib-surface.c 2015-06-04 17:42:51.424665839 -0700 |
|
9 @@ -2325,6 +2325,7 @@ |
|
10 cairo_region_t *clip_region) |
|
11 { |
|
12 cairo_image_surface_t *image; |
|
13 + cairo_format_masks_t image_masks; |
|
14 cairo_rectangle_int_t extents; |
|
15 cairo_status_t status; |
|
16 int tx, ty; |
|
17 @@ -2341,6 +2342,16 @@ |
|
18 (image->base.content & CAIRO_CONTENT_ALPHA) == 0))) |
|
19 return CAIRO_INT_STATUS_UNSUPPORTED; |
|
20 |
|
21 + if (image->base.backend->type == CAIRO_SURFACE_TYPE_IMAGE) { |
|
22 + if (_pixman_format_to_masks (image->pixman_format, &image_masks)) { |
|
23 + if (! ((image_masks.alpha_mask == surface->a_mask || surface->a_mask == 0) && |
|
24 + (image_masks.red_mask == surface->r_mask || surface->r_mask == 0) && |
|
25 + (image_masks.green_mask == surface->g_mask || surface->g_mask == 0) && |
|
26 + (image_masks.blue_mask == surface->b_mask || surface->b_mask == 0))) |
|
27 + return CAIRO_INT_STATUS_UNSUPPORTED; |
|
28 + } |
|
29 + } |
|
30 + |
|
31 if (image->base.backend->type != CAIRO_SURFACE_TYPE_IMAGE) { |
|
32 if (image->base.backend->type == CAIRO_INTERNAL_SURFACE_TYPE_SNAPSHOT) { |
|
33 image = (cairo_image_surface_t *) ((cairo_surface_snapshot_t *) image)->target; |