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

Unified Diff: src/core/SkBlitBWMaskTemplate.h

Issue 1168303006: Revert[2] SkDraw and all Blitters to use pixmap instead of bitmapi (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add dox to new test Created 5 years, 6 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/SkAAClip.cpp ('k') | src/core/SkBlitMask.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBlitBWMaskTemplate.h
diff --git a/src/core/SkBlitBWMaskTemplate.h b/src/core/SkBlitBWMaskTemplate.h
index 798e44aaa49e0423fa22a24a821f7a31377153b8..accf498abaa3d2f6afe8953c5b584a8bece70794 100644
--- a/src/core/SkBlitBWMaskTemplate.h
+++ b/src/core/SkBlitBWMaskTemplate.h
@@ -19,19 +19,19 @@
SK_BLITBWMASK_NAME name of function(const SkBitmap& bitmap, const SkMask& mask, const SkIRect& clip, SK_BLITBWMASK_ARGS)
SK_BLITBWMASK_ARGS list of additional arguments to SK_BLITBWMASK_NAME, beginning with a comma
SK_BLITBWMASK_BLIT8 name of function(U8CPU byteMask, SK_BLITBWMASK_DEVTYPE* dst, int x, int y)
- SK_BLITBWMASK_GETADDR either getAddr32 or getAddr16 or getAddr8
+ SK_BLITBWMASK_GETADDR either writable_addr[8,16,32]
SK_BLITBWMASK_DEVTYPE either U32 or U16 or U8
*/
-static void SK_BLITBWMASK_NAME(const SkBitmap& bitmap, const SkMask& srcMask, const SkIRect& clip SK_BLITBWMASK_ARGS)
-{
+static void SK_BLITBWMASK_NAME(const SkPixmap& dst, const SkMask& srcMask,
+ const SkIRect& clip SK_BLITBWMASK_ARGS) {
SkASSERT(clip.fRight <= srcMask.fBounds.fRight);
int cx = clip.fLeft;
int cy = clip.fTop;
int maskLeft = srcMask.fBounds.fLeft;
unsigned mask_rowBytes = srcMask.fRowBytes;
- size_t bitmap_rowBytes = bitmap.rowBytes();
+ size_t bitmap_rowBytes = dst.rowBytes();
unsigned height = clip.height();
SkASSERT(mask_rowBytes != 0);
@@ -39,7 +39,7 @@ static void SK_BLITBWMASK_NAME(const SkBitmap& bitmap, const SkMask& srcMask, co
SkASSERT(height != 0);
const uint8_t* bits = srcMask.getAddr1(cx, cy);
- SK_BLITBWMASK_DEVTYPE* device = bitmap.SK_BLITBWMASK_GETADDR(cx, cy);
+ SK_BLITBWMASK_DEVTYPE* device = dst.SK_BLITBWMASK_GETADDR(cx, cy);
if (cx == maskLeft && clip.fRight == srcMask.fBounds.fRight)
{
« no previous file with comments | « src/core/SkAAClip.cpp ('k') | src/core/SkBlitMask.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698