Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(845)

Unified Diff: Source/core/html/canvas/CanvasRenderingContext2D.cpp

Issue 1216523005: Fix 2D canvas drawImage handling of non-invertible transform matrices (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/CanvasRenderingContext2D.cpp
diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.cpp b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
index ad626b2ac61dbe69366729cc585de45edfb25b38..c5bfa6d21158ef005ee5f6c184745209414fa2e4 100644
--- a/Source/core/html/canvas/CanvasRenderingContext2D.cpp
+++ b/Source/core/html/canvas/CanvasRenderingContext2D.cpp
@@ -1282,7 +1282,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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698