invert comparison sense for reason return
authorhumper <humper@google.com>
Mon, 2 Jun 2014 18:09:12 +0000 (11:09 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 2 Jun 2014 18:09:13 +0000 (11:09 -0700)
BUG=skia:
R=bsalomon@google.com

Author: humper@google.com

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

src/core/SkPicture.cpp

index 57a6149..8bb1254 100644 (file)
@@ -664,10 +664,12 @@ bool SkPicture::suitableForGpuRasterization(GrContext* context, const char **rea
     bool ret = this->numPaintWithPathEffectUses() < kNumPaintWithPathEffectUsesTol &&
                (this->numAAConcavePaths()-this->numAAHairlineConcavePaths()) < kNumAAConcavePaths;
     if (!ret && reason) {
-        if (this->numPaintWithPathEffectUses() < kNumPaintWithPathEffectUsesTol)
+        if (this->numPaintWithPathEffectUses() >= kNumPaintWithPathEffectUsesTol)
             *reason = "Too many path effects.";
-        else if ((this->numAAConcavePaths()-this->numAAHairlineConcavePaths()) < kNumAAConcavePaths)
+        else if ((this->numAAConcavePaths()-this->numAAHairlineConcavePaths()) >= kNumAAConcavePaths)
             *reason = "Too many anti-aliased concave paths.";
+        else
+            *reason = "Unknown reason for GPU unsuitability.";
     }
     return ret;
 }