diff options
author | reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2009-09-23 15:06:10 +0000 |
---|---|---|
committer | reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2009-09-23 15:06:10 +0000 |
commit | c4cae85752e3e486cf4eac8cd8128f57b6f40563 (patch) | |
tree | 88e32782e35ec5cfb18dafe5f84e76752b54d6b6 /src/core/SkBlitRow.h | |
parent | 9186103dfdb7dfe32803ffad7c3caf1d739a226d (diff) |
add BlitRow procs for 32->32, to allow for neon and other optimizations.
call these new procs in (nearly) all the places we had inlined loops before.
In once instance (blitter_argb32::blitAntiH) we get different results by a
tiny bit. The new code is more accurate, and exactly inline with all of the
other like-minded blits, so I think the change is good going forward.
git-svn-id: http://skia.googlecode.com/svn/trunk@366 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkBlitRow.h')
-rw-r--r-- | src/core/SkBlitRow.h | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/core/SkBlitRow.h b/src/core/SkBlitRow.h deleted file mode 100644 index ec31ff5309..0000000000 --- a/src/core/SkBlitRow.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef SkBlitRow_DEFINED -#define SkBlitRow_DEFINED - -#include "SkBitmap.h" -#include "SkColor.h" - -class SkBlitRow { -public: - enum { - //! If set, the alpha parameter will be != 255 - kGlobalAlpha_Flag = 0x01, - //! If set, the src colors may have alpha != 255 - kSrcPixelAlpha_Flag = 0x02, - //! If set, the resulting 16bit colors should be dithered - kDither_Flag = 0x04 - }; - - /** Function pointer that reads a scanline of src SkPMColors, and writes - a corresponding scanline of 16bit colors (specific format based on the - config passed to the Factory. - - The x,y params are useful just for dithering - - @param alpha A global alpha to be applied to all of the src colors - @param x The x coordinate of the beginning of the scanline - @param y THe y coordinate of the scanline - */ - typedef void (*Proc)(uint16_t* SK_RESTRICT dst, - const SkPMColor* SK_RESTRICT src, - int count, U8CPU alpha, int x, int y); - - //! Public entry-point to return a blit function ptr - static Proc Factory(unsigned flags, SkBitmap::Config); - -private: - /** These global arrays are indexed using the flags parameter to Factory, - and contain either NULL, or a platform-specific function-ptr to be used - in place of the system default. - */ - static const Proc gPlatform_565_Procs[]; - static const Proc gPlatform_4444_Procs[]; -}; - -#endif |