roundToDevicePixels() was added in http://trac.webkit.org/changeset/14739 to canvas in order to remedy pixel cracks when at non-integral scales. This code path causes us to create clips for drawImage which causes the drawImage path to be much slower in CG. Chromium appears to ignore the method altogether by early returning from it. I don't believe it's necessary to worry about rounding to device pixels when drawing in the canvas' backing stores.
Created attachment 92531 [details]
Comment on attachment 92531 [details]
Were all these calls to roundToDevicePixels() added at the same time? Have you looked at the history to check why each was added?
Created attachment 92810 [details]
Comment on attachment 92810 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=92810&action=review
> - CGContextDrawImage(context, GraphicsContext(context).roundToDevicePixels(FloatRect(0, 0, CGImageGetWidth(image), CGImageGetHeight(image))), image);
> + CGContextDrawImage(context, FloatRect(0, 0, CGImageGetWidth(image), CGImageGetHeight(image)), image);
The change log says "This could only affect canvases at non-integral scale factors" but that doesn't seem to be true for this change.
> + CGRect rect = FloatRect(0, 0, CGImageGetWidth(platformImage), CGImageGetHeight(platformImage));
Created attachment 92829 [details]
Committed r86085: <http://trac.webkit.org/changeset/86085>