OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #include "SkCoreBlitters.h" | 10 #include "SkCoreBlitters.h" |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 int height = clip.height(); | 329 int height = clip.height(); |
330 uint8_t* device = fDevice.getAddr8(x, y); | 330 uint8_t* device = fDevice.getAddr8(x, y); |
331 const uint8_t* alpha = mask.getAddr8(x, y); | 331 const uint8_t* alpha = mask.getAddr8(x, y); |
332 | 332 |
333 SkPMColor* span = fBuffer; | 333 SkPMColor* span = fBuffer; |
334 | 334 |
335 while (--height >= 0) { | 335 while (--height >= 0) { |
336 fShader->shadeSpan(x, y, span, width); | 336 fShader->shadeSpan(x, y, span, width); |
337 if (fXfermode) { | 337 if (fXfermode) { |
338 fXfermode->xferA8(device, span, width, alpha); | 338 fXfermode->xferA8(device, span, width, alpha); |
| 339 } else { |
| 340 for (int i = width - 1; i >= 0; --i) { |
| 341 device[i] = aa_blend8(span[i], device[i], alpha[i]); |
| 342 } |
339 } | 343 } |
340 | 344 |
341 y += 1; | 345 y += 1; |
342 device += fDevice.rowBytes(); | 346 device += fDevice.rowBytes(); |
343 alpha += mask.fRowBytes; | 347 alpha += mask.fRowBytes; |
344 } | 348 } |
345 } | 349 } |
OLD | NEW |