Commit 5a5ebad8 authored by junov@chromium.org's avatar junov@chromium.org

Fix 2D canvas drawImage handling of non-invertible transform matrices

BUG=504687

Review URL: https://codereview.chromium.org/1216523005

git-svn-id: svn://svn.chromium.org/blink/trunk@198018 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 92be5598
......@@ -1322,7 +1322,11 @@ void CanvasRenderingContext2D::drawImageInternal(CanvasImageSource* imageSource,
SkMatrix ctm = c->getTotalMatrix();
SkMatrix invCtm;
if (!ctm.invert(&invCtm)) {
ASSERT_NOT_REACHED(); // There is an earlier check for invertibility
// There is an earlier check for invertibility, but the arithmetic
// in AffineTransform is not exactly identical, so it is possible
// for SkMatrix to find the transform to be non-invertible at this stage.
// crbug.com/504687
return;
}
c->save();
c->concat(invCtm);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment