aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBlitMask.h
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-11-14 21:56:45 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-11-14 21:56:45 +0000
commite901b4ccdbd0b7134b7c9ce75701b22ee7821dec (patch)
tree37d9a009abc640f80bda68d5b010f3ad66eb2cbf /src/core/SkBlitMask.h
parentec6d2183bdfa18c9232af7bc10bdf77a2d2d1ed8 (diff)
rename/refactor in preparation for supporting accelerated blits of shader-output
through a mask. git-svn-id: http://skia.googlecode.com/svn/trunk@2684 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkBlitMask.h')
-rw-r--r--src/core/SkBlitMask.h37
1 files changed, 29 insertions, 8 deletions
diff --git a/src/core/SkBlitMask.h b/src/core/SkBlitMask.h
index 95a81ed2a5..66687a9c29 100644
--- a/src/core/SkBlitMask.h
+++ b/src/core/SkBlitMask.h
@@ -9,6 +9,7 @@
#define SkBlitMask_DEFINED
#include "SkBitmap.h"
+#include "SkColor.h"
#include "SkMask.h"
class SkBlitMask {
@@ -25,21 +26,41 @@ public:
* by color. The number of pixels to blit is specified by width and height,
* but each scanline is offset by dstRB (rowbytes) and srcRB respectively.
*/
- typedef void (*Proc)(void* dst, size_t dstRB,
- const void* mask, size_t maskRB,
- SkColor color, int width, int height);
+ typedef void (*ColorProc)(void* dst, size_t dstRB,
+ const void* mask, size_t maskRB,
+ SkColor color, int width, int height);
/**
- * Public entry-point to return a blitmask function ptr.
+ * Function pointer that blits a row of src colors through a row of a mask
+ * onto a row of dst colors. The RowFactory that returns this function ptr
+ * will have been told the formats for the mask and the dst.
+ */
+ typedef void (*RowProc)(void* dst, const void* mask,
+ const SkPMColor* src, int width);
+
+ /**
+ * Public entry-point to return a blitmask ColorProc.
* May return NULL if config or format are not supported.
*/
- static Proc Factory(SkBitmap::Config dstConfig, SkMask::Format, SkColor);
-
+ static ColorProc ColorFactory(SkBitmap::Config, SkMask::Format, SkColor);
+
+ /**
+ * Public entry-point to return a blitmask RowProc.
+ * May return NULL if config or format are not supported.
+ */
+ static RowProc RowFactory(SkBitmap::Config, SkMask::Format);
+
+ /**
+ * Return either platform specific optimized blitmask ColorProc,
+ * or NULL if no optimized routine is available.
+ */
+ static ColorProc PlatformColorProcs(SkBitmap::Config, SkMask::Format, SkColor);
+
/**
- * Return either platform specific optimized blitmask function-ptr,
+ * Return either platform specific optimized blitmask RowProc,
* or NULL if no optimized routine is available.
*/
- static Proc PlatformProcs(SkBitmap::Config dstConfig, SkMask::Format, SkColor);
+ static RowProc PlatformRowProcs(SkBitmap::Config, SkMask::Format);
};
#endif