From 9cee33e631679fc8195e7892b5aa5fdffb0b568e Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Thu, 16 Feb 2017 07:43:40 -0500 Subject: [PATCH] Take missed opportunity: memset for A8. Just recently noticed we weren't doing this. It seems to be triggering all the time. Draws the same of course. Change-Id: Ie3d869a05194a5d52d635643eba1c96c8a21ce67 Reviewed-on: https://skia-review.googlesource.com/8471 Reviewed-by: Mike Reed Commit-Queue: Mike Klein --- src/core/SkRasterPipelineBlitter.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/core/SkRasterPipelineBlitter.cpp b/src/core/SkRasterPipelineBlitter.cpp index 197233c3cd..87a76aa648 100644 --- a/src/core/SkRasterPipelineBlitter.cpp +++ b/src/core/SkRasterPipelineBlitter.cpp @@ -224,16 +224,10 @@ void SkRasterPipelineBlitter::blitH(int x, int y, int w) { if (fCanMemsetInBlitH) { switch (fDst.shiftPerPixel()) { - // TODO: case 0: memset (for A8) - case 1: - sk_memset16((uint16_t*)fDstPtr + x, fMemsetColor, w); - return; - case 2: - sk_memset32((uint32_t*)fDstPtr + x, fMemsetColor, w); - return; - case 3: - sk_memset64((uint64_t*)fDstPtr + x, fMemsetColor, w); - return; + case 0: memset ((uint8_t *)fDstPtr + x, fMemsetColor, w); return; + case 1: sk_memset16((uint16_t*)fDstPtr + x, fMemsetColor, w); return; + case 2: sk_memset32((uint32_t*)fDstPtr + x, fMemsetColor, w); return; + case 3: sk_memset64((uint64_t*)fDstPtr + x, fMemsetColor, w); return; default: break; } }