aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-10-24 21:04:04 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-10-24 21:04:04 +0000
commita8790debaab6c5e3b6a4a51d2cc91ae5aea9b2dd (patch)
treecc37fe637157a12d60029ce3211268ddfe55e6e4 /src
parent8ea78d83dc4e8243c16eedf8100a3987c54123fa (diff)
If a path is known to be nonfinite, don't forget that in our autobounds
helper. "Once a non-finite, always a non-finite". Inspired by crbug/157157 Review URL: https://codereview.appspot.com/6764047 git-svn-id: http://skia.googlecode.com/svn/trunk@6087 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r--src/core/SkPath.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index 343350b850..6d055f5b7f 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -157,7 +157,9 @@ private:
// returns true if we should proceed
void init(SkPath* path) {
fPath = path;
- fDirty = SkToBool(path->fBoundsIsDirty);
+ // Mark the path's bounds as dirty if (1) they are, or (2) the path
+ // is non-finite, and therefore its bounds are not meaningful
+ fDirty = SkToBool(path->fBoundsIsDirty) || !path->fIsFinite;
fDegenerate = is_degenerate(*path);
fEmpty = path->isEmpty();
// Cannot use fRect for our bounds unless we know it is sorted