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

Unified Diff: src/effects/gradients/SkSweepGradient.cpp

Issue 1692013002: Change SkMatrix::fixedStepInX to return SkVector rather than SkFixed. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Split fixedStepInX into bool isFixedStepInX and SkVector fixedStepInX. Created 4 years, 10 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 | « src/effects/gradients/SkRadialGradient.cpp ('k') | src/effects/gradients/SkTwoPointConicalGradient.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkSweepGradient.cpp
diff --git a/src/effects/gradients/SkSweepGradient.cpp b/src/effects/gradients/SkSweepGradient.cpp
index ddff882e38b7f5b9c6438a1feabfa9d5897b9f4f..94686524ed4b876baf715fa1d6516028851c053f 100644
--- a/src/effects/gradients/SkSweepGradient.cpp
+++ b/src/effects/gradients/SkSweepGradient.cpp
@@ -92,11 +92,9 @@ void SkSweepGradient::SweepGradientContext::shadeSpan(int x, int y, SkPMColor* S
SkScalar dy, fy = srcPt.fY;
if (fDstToIndexClass == kFixedStepInX_MatrixClass) {
- SkFixed storage[2];
- (void)matrix.fixedStepInX(SkIntToScalar(y) + SK_ScalarHalf,
- &storage[0], &storage[1]);
- dx = SkFixedToScalar(storage[0]);
- dy = SkFixedToScalar(storage[1]);
+ const auto step = matrix.fixedStepInX(SkIntToScalar(y) + SK_ScalarHalf);
+ dx = step.fX;
+ dy = step.fY;
} else {
SkASSERT(fDstToIndexClass == kLinear_MatrixClass);
dx = matrix.getScaleX();
« no previous file with comments | « src/effects/gradients/SkRadialGradient.cpp ('k') | src/effects/gradients/SkTwoPointConicalGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698