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

Unified Diff: src/core/SkLinearBitmapPipeline_matrix.h

Issue 2486523002: Change code to not store Sk4* in data structures. (Closed)
Patch Set: Address comments 2 Created 4 years, 1 month 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/core/SkLinearBitmapPipeline.cpp ('k') | src/core/SkLinearBitmapPipeline_sample.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkLinearBitmapPipeline_matrix.h
diff --git a/src/core/SkLinearBitmapPipeline_matrix.h b/src/core/SkLinearBitmapPipeline_matrix.h
index d194d0729a7fa30eb0b159f3af03e5dc63918410..2eb475d510cf3e833f11d128fd6dd4263d3c7914 100644
--- a/src/core/SkLinearBitmapPipeline_matrix.h
+++ b/src/core/SkLinearBitmapPipeline_matrix.h
@@ -26,12 +26,12 @@ public:
bool maybeProcessSpan(Span span, Next* next) {
SkPoint start; SkScalar length; int count;
std::tie(start, length, count) = span;
- next->pointSpan(Span{start + SkPoint{fXOffset[0], fYOffset[0]}, length, count});
+ next->pointSpan(Span{start + SkPoint{fXOffset, fYOffset}, length, count});
return true;
}
private:
- const Sk4s fXOffset, fYOffset;
+ const SkScalar fXOffset, fYOffset;
};
class ScaleMatrixStrategy {
@@ -49,15 +49,15 @@ public:
SkPoint start; SkScalar length; int count;
std::tie(start, length, count) = span;
SkPoint newStart =
- SkPoint{X(start) * fXScale[0] + fXOffset[0], Y(start) * fYScale[0] + fYOffset[0]};
- SkScalar newLength = length * fXScale[0];
+ SkPoint{X(start) * fXScale + fXOffset, Y(start) * fYScale + fYOffset};
+ SkScalar newLength = length * fXScale;
next->pointSpan(Span{newStart, newLength, count});
return true;
}
private:
- const Sk4s fXOffset, fYOffset;
- const Sk4s fXScale, fYScale;
+ const SkScalar fXOffset, fYOffset;
+ const SkScalar fXScale, fYScale;
};
class AffineMatrixStrategy {
@@ -80,9 +80,9 @@ public:
}
private:
- const Sk4s fXOffset, fYOffset;
- const Sk4s fXScale, fYScale;
- const Sk4s fXSkew, fYSkew;
+ const SkScalar fXOffset, fYOffset;
+ const SkScalar fXScale, fYScale;
+ const SkScalar fXSkew, fYSkew;
};
class PerspectiveMatrixStrategy {
@@ -107,9 +107,9 @@ public:
}
private:
- const Sk4s fXOffset, fYOffset, fZOffset;
- const Sk4s fXScale, fYScale;
- const Sk4s fXSkew, fYSkew, fZXSkew, fZYSkew;
+ const SkScalar fXOffset, fYOffset, fZOffset;
+ const SkScalar fXScale, fYScale;
+ const SkScalar fXSkew, fYSkew, fZXSkew, fZYSkew;
};
« no previous file with comments | « src/core/SkLinearBitmapPipeline.cpp ('k') | src/core/SkLinearBitmapPipeline_sample.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698