| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkCoreBlitters.h" | 8 #include "SkCoreBlitters.h" |
| 9 #include "SkColorPriv.h" | 9 #include "SkColorPriv.h" |
| 10 #include "SkShader.h" | 10 #include "SkShader.h" |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 const uint8_t* maskRow = (const uint8_t*)mask.getAddr(x, y); | 563 const uint8_t* maskRow = (const uint8_t*)mask.getAddr(x, y); |
| 564 const size_t maskRB = mask.fRowBytes; | 564 const size_t maskRB = mask.fRowBytes; |
| 565 | 565 |
| 566 SkPMColor* span = fBuffer; | 566 SkPMColor* span = fBuffer; |
| 567 | 567 |
| 568 if (fXfermode) { | 568 if (fXfermode) { |
| 569 SkASSERT(SkMask::kA8_Format == mask.fFormat); | 569 SkASSERT(SkMask::kA8_Format == mask.fFormat); |
| 570 SkXfermode* xfer = fXfermode; | 570 SkXfermode* xfer = fXfermode; |
| 571 do { | 571 do { |
| 572 shaderContext->shadeSpan(x, y, span, width); | 572 shaderContext->shadeSpan(x, y, span, width); |
| 573 xfer->xfer32(reinterpret_cast<SkPMColor*>(dstRow), span, width, mask
Row); | 573 xfer->xfer32((SkPMColor*)dstRow, span, width, maskRow); |
| 574 dstRow += dstRB; | 574 dstRow += dstRB; |
| 575 maskRow += maskRB; | 575 maskRow += maskRB; |
| 576 y += 1; | 576 y += 1; |
| 577 } while (--height > 0); | 577 } while (--height > 0); |
| 578 } else { | 578 } else { |
| 579 do { | 579 do { |
| 580 shaderContext->shadeSpan(x, y, span, width); | 580 shaderContext->shadeSpan(x, y, span, width); |
| 581 proc(reinterpret_cast<SkPMColor*>(dstRow), maskRow, span, width); | 581 proc(dstRow, maskRow, span, width); |
| 582 dstRow += dstRB; | 582 dstRow += dstRB; |
| 583 maskRow += maskRB; | 583 maskRow += maskRB; |
| 584 y += 1; | 584 y += 1; |
| 585 } while (--height > 0); | 585 } while (--height > 0); |
| 586 } | 586 } |
| 587 } | 587 } |
| 588 | 588 |
| 589 void SkARGB32_Shader_Blitter::blitV(int x, int y, int height, SkAlpha alpha) { | 589 void SkARGB32_Shader_Blitter::blitV(int x, int y, int height, SkAlpha alpha) { |
| 590 SkASSERT(x >= 0 && y >= 0 && y + height <= fDevice.height()); | 590 SkASSERT(x >= 0 && y >= 0 && y + height <= fDevice.height()); |
| 591 | 591 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 SkBlitRow::Proc32 proc = (255 == alpha) ? fProc32 : fProc32Blend; | 676 SkBlitRow::Proc32 proc = (255 == alpha) ? fProc32 : fProc32Blend; |
| 677 do { | 677 do { |
| 678 shaderContext->shadeSpan(x, y, span, 1); | 678 shaderContext->shadeSpan(x, y, span, 1); |
| 679 proc(device, span, 1, alpha); | 679 proc(device, span, 1, alpha); |
| 680 y += 1; | 680 y += 1; |
| 681 device = (uint32_t*)((char*)device + deviceRB); | 681 device = (uint32_t*)((char*)device + deviceRB); |
| 682 } while (--height > 0); | 682 } while (--height > 0); |
| 683 } | 683 } |
| 684 } | 684 } |
| 685 } | 685 } |
| OLD | NEW |