[chromium] Add asserts to test for contiguous-pixel Skia bitmaps.
Created attachment 76768 [details] Patch
Since Skia bitmaps may have rowBytes() >= bytesPerPixel() * width(), and since some places in the code assume the equality above is enforced, add asserts() to detect when there are extra bytes at the end of each line where padding=0 is assumed.
James R, can you please review this? It's a very short (and hopefully straightforward) CL.
Comment on attachment 76768 [details] Patch Looks OK.
Comment on attachment 76768 [details] Patch Clearing flags on attachment: 76768 Committed r74503: <http://trac.webkit.org/changeset/74503>
All reviewed patches have been landed. Closing bug.
Created attachment 77333 [details] Patch
Comment on attachment 77333 [details] Patch The patch failed on mac compile (I thought I had tested this, but apparently not). I have revised to correct, and this patch has been re-tested to make sure it compiles on Mac.
Patch reverted due to not compiling on mac.
Comment on attachment 77333 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=77333&action=review The "if" with an ASSERT as its sole arm is sloppy. > WebCore/platform/graphics/chromium/ImageLayerChromium.cpp:125 > + ASSERT(skiaBitmap->rowBytes() == SkBitmap::ComputeRowBytes(skiaConfig, skiaBitmap->width())); ASSERT(!pixels || (skiaBitmap->rowBytes() == ...))
Created attachment 77335 [details] Patch
(In reply to comment #10) > > ASSERT(!pixels || (skiaBitmap->rowBytes() == ...)) This is much better, thanks.
Comment on attachment 77335 [details] Patch OK.
Comment on attachment 77335 [details] Patch Clearing flags on attachment: 77335 Committed r74561: <http://trac.webkit.org/changeset/74561>
These assertions seem to have broken the Chromium UI tests. See https://bugs.webkit.org/show_bug.cgi?id=51565 , but in particular: http://build.chromium.org/p/chromium/builders/Vista%20Tests%20(dbg)(2)/builds/3052 the failure of UITestCanLaunchWithOSMesa, and: http://build.chromium.org/p/chromium/builders/Vista%20Tests%20(dbg)(2)/builds/3052/steps/ui_tests/logs/stdio http://build.chromium.org/p/chromium/builders/Vista%20Tests%20(dbg)(2)/builds/3052/steps/Process%20Dumps/logs/stdio Reopening. Please test this patch with this test on Windows before resubmitting.
See above comment.