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

Unified Diff: src/core/SkLinearBitmapPipeline.cpp

Issue 1746093002: Fix overlooked bilerp fallback. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Simplify fallback. 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 | « 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/SkLinearBitmapPipeline.cpp
diff --git a/src/core/SkLinearBitmapPipeline.cpp b/src/core/SkLinearBitmapPipeline.cpp
index 2090a1e436764f2c581b40d6b6f1444ec5d75fd7..347803cd300584f45956c33a6e770cde32210fb4 100644
--- a/src/core/SkLinearBitmapPipeline.cpp
+++ b/src/core/SkLinearBitmapPipeline.cpp
@@ -423,7 +423,19 @@ public:
void pointSpan(Span span) override {
SkASSERT(!span.isEmpty());
- span_fallback(span, fNext);
+ SkPoint start; SkScalar length; int count;
+ std::tie(start, length, count) = span;
+ float dx = length / (count - 1);
+
+ Sk4f Xs = Sk4f{X(start)} + Sk4f{-0.5f, 0.5f, -0.5f, 0.5f};
+ Sk4f Ys = Sk4f{Y(start)} + Sk4f{-0.5f, -0.5f, 0.5f, 0.5f};
+
+ Sk4f dXs{dx};
+ while (count > 0) {
+ fNext->bilerpList(Xs, Ys);
+ Xs = Xs + dXs;
mtklein_C 2016/02/29 20:19:45 Xs = Xs + dx
herb_g 2016/02/29 20:57:40 Acknowledged.
+ count -= 1;
+ }
}
private:
« 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