Bug 99332

Summary: [WK2][CAIRO] Use cairo_format_stride_for_width() in ShareableBitmap
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: cgarcia, kenneth, laszlo.gombos, mrobinson, webkit.review.bot, yael
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
URL: http://cairographics.org/manual/cairo-Image-Surfaces.html#cairo-image-surface-create-for-data
Attachments:
Description Flags
Patch none

Chris Dumez
Reported 2012-10-15 08:36:09 PDT
Cairo implementation of ShareableBitmap calls cairo_image_surface_create_for_data(data, format, width, height, stride) to create an image surface for the provided pixel data. The Cairo documentation states: "Note that the stride may be larger than width*bytes_per_pixel to provide proper alignment for each pixel and row. This alignment is required to allow high-performance rendering within cairo. The correct way to obtain a legal stride value is to call cairo_format_stride_for_width() with the desired format and maximum image width value, and then use the resulting stride value to allocate the data and to create the image surface." However, the current implementation always uses "m_size.width() * 4" for stride argument, instead of calling cairo_format_stride_for_width(). This may affect rendering performance in cairo.
Attachments
Patch (5.24 KB, patch)
2012-10-15 08:45 PDT, Chris Dumez
no flags
Kenneth Rohde Christiansen
Comment 1 2012-10-15 08:38:03 PDT
Sounds sane to fix this
Chris Dumez
Comment 2 2012-10-15 08:45:00 PDT
WebKit Review Bot
Comment 3 2012-10-15 14:00:50 PDT
Comment on attachment 168722 [details] Patch Clearing flags on attachment: 168722 Committed r131354: <http://trac.webkit.org/changeset/131354>
WebKit Review Bot
Comment 4 2012-10-15 14:00:55 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.