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

Unified Diff: src/core/SkLinearBitmapPipeline_core.h

Issue 2174793002: Revert of Redo Tiling (Closed) Base URL: https://skia.googlesource.com/skia.git@reduce-LBP-sample
Patch Set: Created 4 years, 5 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/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_core.h
diff --git a/src/core/SkLinearBitmapPipeline_core.h b/src/core/SkLinearBitmapPipeline_core.h
index cf120eec656c884986f95ca7b8751926a7e4660d..2c39a38320b18aefc0c217d7154c36c9b3dc1b21 100644
--- a/src/core/SkLinearBitmapPipeline_core.h
+++ b/src/core/SkLinearBitmapPipeline_core.h
@@ -178,15 +178,6 @@
stage->pointListFew(count, xs, ys);
}
}
-
-inline Sk4f check_pixel(Sk4f& pixel) {
- SkASSERTF(0.0f <= pixel[0] && pixel[0] <= 1.0f, "pixel[0]: %f", pixel[0]);
- SkASSERTF(0.0f <= pixel[1] && pixel[1] <= 1.0f, "pixel[1]: %f", pixel[1]);
- SkASSERTF(0.0f <= pixel[2] && pixel[2] <= 1.0f, "pixel[2]: %f", pixel[2]);
- SkASSERTF(0.0f <= pixel[3] && pixel[3] <= 1.0f, "pixel[3]: %f", pixel[3]);
- return pixel;
-}
-
} // namespace
class SkLinearBitmapPipeline::PointProcessorInterface {
@@ -210,6 +201,26 @@
// Used for nearest neighbor when scale factor is 1.0. The span can just be repeated with no
// edge pixel alignment problems. This is for handling a very common case.
virtual void repeatSpan(Span span, int32_t repeatCount) = 0;
+
+ // The x's and y's are setup in the following order:
+ // +--------+--------+
+ // | | |
+ // | px00 | px10 |
+ // | 0 | 1 |
+ // +--------+--------+
+ // | | |
+ // | px01 | px11 |
+ // | 2 | 3 |
+ // +--------+--------+
+ // These pixels coordinates are arranged in the following order in xs and ys:
+ // px00 px10 px01 px11
+ virtual void SK_VECTORCALL bilerpEdge(Sk4s xs, Sk4s ys) = 0;
+
+ // A span represents sample points that have been mapped from destination space to source
+ // space. Each sample point is then expanded to the four bilerp points by add +/- 0.5. The
+ // resulting Y values my be off the tile. When y +/- 0.5 are more than 1 apart because of
+ // tiling, the second Y is used to denote the retiled Y value.
+ virtual void bilerpSpan(Span span, SkScalar y) = 0;
};
class SkLinearBitmapPipeline::DestinationInterface {
@@ -232,10 +243,10 @@
public:
virtual ~PixelAccessorInterface() { }
virtual void SK_VECTORCALL getFewPixels(
- int n, Sk4i xs, Sk4i ys, Sk4f* px0, Sk4f* px1, Sk4f* px2) const = 0;
+ int n, Sk4s xs, Sk4s ys, Sk4f* px0, Sk4f* px1, Sk4f* px2) const = 0;
virtual void SK_VECTORCALL get4Pixels(
- Sk4i xs, Sk4i ys, Sk4f* px0, Sk4f* px1, Sk4f* px2, Sk4f* px3) const = 0;
+ Sk4s xs, Sk4s ys, Sk4f* px0, Sk4f* px1, Sk4f* px2, Sk4f* px3) const = 0;
virtual void get4Pixels(
const void* src, int index, Sk4f* px0, Sk4f* px1, Sk4f* px2, Sk4f* px3) const = 0;
« 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