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

Unified Diff: src/core/SkPicture.cpp

Issue 313433003: invert comparison sense for reason return (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 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: src/core/SkPicture.cpp
diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp
index 57a614913ee4a91ba7dfb8f91e1ed7d22815122d..8bb12543b5008dbe30d43d4de9d7345f265013b4 100644
--- a/src/core/SkPicture.cpp
+++ b/src/core/SkPicture.cpp
@@ -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;
}
« 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