components/desktop/firefox/patches/firefox-01-cairo-perf.patch
branchs11u3-sru
changeset 7364 1ac24a377555
parent 7035 4c2f26e9d5ab
equal deleted inserted replaced
7356:74eef0c2f07d 7364:1ac24a377555
     6 
     6 
     7 diff --git a/gfx/cairo/cairo/src/cairo-xlib-surface.c b/gfx/cairo/cairo/src/cairo-xlib-surface.c
     7 diff --git a/gfx/cairo/cairo/src/cairo-xlib-surface.c b/gfx/cairo/cairo/src/cairo-xlib-surface.c
     8 --- a/gfx/cairo/cairo/src/cairo-xlib-surface.c
     8 --- a/gfx/cairo/cairo/src/cairo-xlib-surface.c
     9 +++ b/gfx/cairo/cairo/src/cairo-xlib-surface.c
     9 +++ b/gfx/cairo/cairo/src/cairo-xlib-surface.c
    10 @@ -2325,6 +2325,7 @@
    10 @@ -2325,6 +2325,7 @@
    11                            cairo_region_t *clip_region)
    11  			   cairo_region_t *clip_region)
    12  {
    12  {
    13      cairo_image_surface_t *image;
    13      cairo_image_surface_t *image;
    14 +    cairo_format_masks_t image_masks;
    14 +    cairo_format_masks_t image_masks;
    15      cairo_rectangle_int_t extents;
    15      cairo_rectangle_int_t extents;
    16      cairo_status_t status;
    16      cairo_status_t status;
    17      int tx, ty;
    17      int tx, ty;
    18 @@ -2341,6 +2342,16 @@
    18 @@ -2341,6 +2342,16 @@
    19             (image->base.content & CAIRO_CONTENT_ALPHA) == 0)))
    19  	    (image->base.content & CAIRO_CONTENT_ALPHA) == 0)))
    20         return CAIRO_INT_STATUS_UNSUPPORTED;
    20  	return CAIRO_INT_STATUS_UNSUPPORTED;
    21  
    21  
    22 +    if (image->base.backend->type == CAIRO_SURFACE_TYPE_IMAGE) {
    22 +    if (image->base.backend->type == CAIRO_SURFACE_TYPE_IMAGE) {
    23 +       if (_pixman_format_to_masks (image->pixman_format, &image_masks)) {
    23 +       if (_pixman_format_to_masks (image->pixman_format, &image_masks)) {
    24 +           if (! ((image_masks.alpha_mask == surface->a_mask || surface->a_mask == 0) &&
    24 +           if (! ((image_masks.alpha_mask == surface->a_mask || surface->a_mask == 0) &&
    25 +                  (image_masks.red_mask   == surface->r_mask || surface->r_mask == 0) &&
    25 +                  (image_masks.red_mask   == surface->r_mask || surface->r_mask == 0) &&
    28 +               return CAIRO_INT_STATUS_UNSUPPORTED;
    28 +               return CAIRO_INT_STATUS_UNSUPPORTED;
    29 +       }
    29 +       }
    30 +    }
    30 +    }
    31 +
    31 +
    32      if (image->base.backend->type != CAIRO_SURFACE_TYPE_IMAGE) {
    32      if (image->base.backend->type != CAIRO_SURFACE_TYPE_IMAGE) {
    33         if (image->base.backend->type == CAIRO_INTERNAL_SURFACE_TYPE_SNAPSHOT) {
    33  	if (image->base.backend->type == CAIRO_INTERNAL_SURFACE_TYPE_SNAPSHOT) {
    34             image = (cairo_image_surface_t *) ((cairo_surface_snapshot_t *) image)->target;
    34  	    image = (cairo_image_surface_t *) ((cairo_surface_snapshot_t *) image)->target;