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

Side by Side Diff: src/core/SkBlitter_A8.cpp

Issue 22867008: Add missing fallback blending to SkA8_Shader_Blitter::blitMask() (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698