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

Unified Diff: src/core/SkLinearBitmapPipeline.h

Issue 1705203002: Add bilerp filtering. (Closed) Base URL: https://skia.googlesource.com/skia.git@fp-simple-linear-20160217
Patch Set: Redo bilerp. 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
Index: src/core/SkLinearBitmapPipeline.h
diff --git a/src/core/SkLinearBitmapPipeline.h b/src/core/SkLinearBitmapPipeline.h
index f6875c6a96ce6815af09b3a3e6fb1a1ca919e956..9d537df5017c63fe6a107c14e203e5335317074d 100644
--- a/src/core/SkLinearBitmapPipeline.h
+++ b/src/core/SkLinearBitmapPipeline.h
@@ -28,6 +28,23 @@ public:
virtual void pointList4(Sk4fArg xs, Sk4fArg ys) = 0;
};
+class BilerpProcessorInterface : public PointProcessorInterface {
+public:
+ // 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 bilerpList(Sk4fArg xs, Sk4fArg ys) = 0;
+};
+
class PixelPlacerInterface {
public:
virtual ~PixelPlacerInterface() { }
@@ -40,6 +57,7 @@ class SkLinearBitmapPipeline {
public:
SkLinearBitmapPipeline(
const SkMatrix& inverse,
+ SkFilterQuality filterQuality,
SkShader::TileMode xTile, SkShader::TileMode yTile,
const SkImageInfo& srcImageInfo,
const void* srcImageData);
@@ -73,13 +91,15 @@ public:
};
using MatrixStage = PolymorphicUnion<PointProcessorInterface, 112>;
- using TileStage = PolymorphicUnion<PointProcessorInterface, 96>;
- using SampleStage = PolymorphicUnion<PointProcessorInterface, 80>;
+ using FilterStage = PolymorphicUnion<PointProcessorInterface, 8>;
+ using TileStage = PolymorphicUnion<BilerpProcessorInterface, 96>;
+ using SampleStage = PolymorphicUnion<BilerpProcessorInterface, 80>;
using PixelStage = PolymorphicUnion<PixelPlacerInterface, 80>;
private:
PointProcessorInterface* fFirstStage;
MatrixStage fMatrixStage;
+ FilterStage fFilterStage;
TileStage fTileXOrBothStage;
TileStage fTileYStage;
SampleStage fSampleStage;

Powered by Google App Engine
This is Rietveld 408576698