diff options
Diffstat (limited to 'skia')
-rw-r--r-- | skia/sgl/SkCanvas.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/skia/sgl/SkCanvas.cpp b/skia/sgl/SkCanvas.cpp index 4088416..99548be 100644 --- a/skia/sgl/SkCanvas.cpp +++ b/skia/sgl/SkCanvas.cpp @@ -957,12 +957,14 @@ bool SkCanvas::getClipBounds(SkRect* bounds, EdgeType et) const { return false; } + SkMatrix inverse; + // if we can't invert the CTM, we can't return local clip bounds + if (!fMCRec->fMatrix->invert(&inverse)) { + return false; + } + if (NULL != bounds) { - SkMatrix inverse; SkRect r; - - fMCRec->fMatrix->invert(&inverse); - // get the clip's bounds const SkIRect& ibounds = clip.getBounds(); // adjust it outwards if we are antialiasing |