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

Unified Diff: include/core/SkMatrix.h

Issue 2397473003: Harden degenerate gradient context handling (Closed)
Patch Set: Created 4 years, 2 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 | src/effects/gradients/Sk4fGradientBase.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkMatrix.h
diff --git a/include/core/SkMatrix.h b/include/core/SkMatrix.h
index 19103843bfe4bbf4023cb8adcbccf2e1c7c483a8..f565a537ba422cc6fd6fd15ea9bba10c7416ae59 100644
--- a/include/core/SkMatrix.h
+++ b/include/core/SkMatrix.h
@@ -736,6 +736,11 @@ public:
this->setTypeMask(mask | kRectStaysRect_Mask);
}
+ /**
+ * Are all elements of the matrix finite?
+ */
+ bool isFinite() const { return SkScalarsAreFinite(fMat, 9); }
+
private:
enum {
/** Set if the matrix will map a rectangle to another rectangle. This
@@ -768,10 +773,6 @@ private:
SkScalar fMat[9];
mutable uint32_t fTypeMask;
- /** Are all elements of the matrix finite?
- */
- bool isFinite() const { return SkScalarsAreFinite(fMat, 9); }
-
static void ComputeInv(SkScalar dst[9], const SkScalar src[9], double invDet, bool isPersp);
uint8_t computeTypeMask() const;
« no previous file with comments | « no previous file | src/effects/gradients/Sk4fGradientBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698