Index: src/core/SkBitmapProcState.h |
diff --git a/src/core/SkBitmapProcState.h b/src/core/SkBitmapProcState.h |
index 7d754fe5092b45936097f3e7f0dd42ec45bfe257..fb21282addf66f93612617897567db04a24136ed 100644 |
--- a/src/core/SkBitmapProcState.h |
+++ b/src/core/SkBitmapProcState.h |
@@ -11,6 +11,7 @@ |
#define SkBitmapProcState_DEFINED |
#include "SkBitmap.h" |
+#include "SkBitmapFilter.h" |
#include "SkMatrix.h" |
#define FractionalInt_IS_64BIT |
@@ -31,6 +32,8 @@ |
class SkPaint; |
+#define SKBITMAP_FILTER_TABLE_SIZE 128 |
reed1
2013/06/18 20:21:21
// Where does this value come from?
humper
2013/06/19 20:49:26
Nowhere -- it's probably a little high, actually;
reed1
2013/06/19 21:14:09
Sorry. I was asking you to document
1. what it is
|
+ |
struct SkBitmapProcState { |
typedef void (*ShaderProc32)(const SkBitmapProcState&, int x, int y, |
@@ -122,6 +125,10 @@ struct SkBitmapProcState { |
SampleProc32 getSampleProc32() const { return fSampleProc32; } |
SampleProc16 getSampleProc16() const { return fSampleProc16; } |
+ void buildFilterCoefficients( SkFixed dst[4], float t ) const; |
+ SkFixed fFilterTable[SKBITMAP_FILTER_TABLE_SIZE]; |
+ SkBitmapFilter *fBitmapFilter; |
+ |
private: |
friend class SkBitmapProcShader; |
@@ -140,11 +147,8 @@ private: |
bool chooseProcs(const SkMatrix& inv, const SkPaint&); |
ShaderProc32 chooseShaderProc32(); |
- |
- /** test method for choosing a bicubic shading filter |
- */ |
- |
- ShaderProc32 chooseBicubicFilterProc(const SkPaint &paint); |
+ ShaderProc32 chooseBitmapFilterProc(const SkPaint &paint); |
+ void precomputeFilterTable(); |
// Return false if we failed to setup for fast translate (e.g. overflow) |
bool setupForTranslate(); |
@@ -200,4 +204,10 @@ void ClampX_ClampY_nofilter_affine(const SkBitmapProcState& s, |
void S32_D16_filter_DX(const SkBitmapProcState& s, |
const uint32_t* xy, int count, uint16_t* colors); |
+void highQualityFilter_ScaleOnly(const SkBitmapProcState &s, int x, int y, |
+ SkPMColor *SK_RESTRICT colors, int count); |
+void highQualityFilter(const SkBitmapProcState &s, int x, int y, |
+ SkPMColor *SK_RESTRICT colors, int count); |
+ |
+ |
#endif |