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 2484273002: Move the matrix stage of SkLinearBitmapPipeline over to using SkSmallAllocator. (Closed)
Patch Set: rebase on new SkSmallAllocator 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') | no next file » | 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 2eb475d510cf3e833f11d128fd6dd4263d3c7914..78f723148ebe42ea4f0c65a789b5e9f42f3ec8b4 100644
--- a/src/core/SkLinearBitmapPipeline_matrix.h
+++ b/src/core/SkLinearBitmapPipeline_matrix.h
@@ -17,13 +17,13 @@ public:
: fXOffset{X(offset)}
, fYOffset{Y(offset)} { }
- void processPoints(Sk4s* xs, Sk4s* ys) {
+ void processPoints(Sk4s* xs, Sk4s* ys) const {
*xs = *xs + fXOffset;
*ys = *ys + fYOffset;
}
template <typename Next>
- bool maybeProcessSpan(Span span, Next* next) {
+ bool maybeProcessSpan(Span span, Next* next) const {
SkPoint start; SkScalar length; int count;
std::tie(start, length, count) = span;
next->pointSpan(Span{start + SkPoint{fXOffset, fYOffset}, length, count});
@@ -39,13 +39,13 @@ public:
ScaleMatrixStrategy(SkVector offset, SkVector scale)
: fXOffset{X(offset)}, fYOffset{Y(offset)}
, fXScale{X(scale)}, fYScale{Y(scale)} { }
- void processPoints(Sk4s* xs, Sk4s* ys) {
+ void processPoints(Sk4s* xs, Sk4s* ys) const {
*xs = *xs * fXScale + fXOffset;
*ys = *ys * fYScale + fYOffset;
}
template <typename Next>
- bool maybeProcessSpan(Span span, Next* next) {
+ bool maybeProcessSpan(Span span, Next* next) const {
SkPoint start; SkScalar length; int count;
std::tie(start, length, count) = span;
SkPoint newStart =
@@ -66,7 +66,7 @@ public:
: fXOffset{X(offset)}, fYOffset{Y(offset)}
, fXScale{X(scale)}, fYScale{Y(scale)}
, fXSkew{X(skew)}, fYSkew{Y(skew)} { }
- void processPoints(Sk4s* xs, Sk4s* ys) {
+ void processPoints(Sk4s* xs, Sk4s* ys) const {
Sk4s newXs = fXScale * *xs + fXSkew * *ys + fXOffset;
Sk4s newYs = fYSkew * *xs + fYScale * *ys + fYOffset;
@@ -75,7 +75,7 @@ public:
}
template <typename Next>
- bool maybeProcessSpan(Span span, Next* next) {
+ bool maybeProcessSpan(Span span, Next* next) const {
return false;
}
@@ -92,7 +92,7 @@ public:
: fXOffset{X(offset)}, fYOffset{Y(offset)}, fZOffset{zOffset}
, fXScale{X(scale)}, fYScale{Y(scale)}
, fXSkew{X(skew)}, fYSkew{Y(skew)}, fZXSkew{X(zSkew)}, fZYSkew{Y(zSkew)} { }
- void processPoints(Sk4s* xs, Sk4s* ys) {
+ void processPoints(Sk4s* xs, Sk4s* ys) const {
Sk4s newXs = fXScale * *xs + fXSkew * *ys + fXOffset;
Sk4s newYs = fYSkew * *xs + fYScale * *ys + fYOffset;
Sk4s newZs = fZXSkew * *xs + fZYSkew * *ys + fZOffset;
@@ -102,7 +102,7 @@ public:
}
template <typename Next>
- bool maybeProcessSpan(Span span, Next* next) {
+ bool maybeProcessSpan(Span span, Next* next) const {
return false;
}
« no previous file with comments | « src/core/SkLinearBitmapPipeline.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698