summaryrefslogtreecommitdiffstats
path: root/skia
diff options
context:
space:
mode:
authorkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-07 00:27:04 +0000
committerkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-07 00:27:04 +0000
commitd81e71ece74aa68db876e639c716e892637a116b (patch)
tree0ef112cb41a9ba8e80a505134576cef3627c8a8e /skia
parentc85d894211d4393c2ba22a1743f674737068e2dc (diff)
downloadchromium_src-d81e71ece74aa68db876e639c716e892637a116b.zip
chromium_src-d81e71ece74aa68db876e639c716e892637a116b.tar.gz
chromium_src-d81e71ece74aa68db876e639c716e892637a116b.tar.bz2
Fix UMR in skia.
BUG=7464 Review URL: http://codereview.chromium.org/21146 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9365 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia')
-rw-r--r--skia/sgl/SkCanvas.cpp10
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