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

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

Issue 57883006: Revert "speed up A8 by creating a new entry-point in SkDraw that blits the path's coverage directly… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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 | « src/core/SkBlitter.cpp ('k') | src/core/SkCoreBlitters.h » ('j') | 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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 for (int i = width - 1; i >= 0; --i) { 340 for (int i = width - 1; i >= 0; --i) {
341 device[i] = aa_blend8(span[i], device[i], alpha[i]); 341 device[i] = aa_blend8(span[i], device[i], alpha[i]);
342 } 342 }
343 } 343 }
344 344
345 y += 1; 345 y += 1;
346 device += fDevice.rowBytes(); 346 device += fDevice.rowBytes();
347 alpha += mask.fRowBytes; 347 alpha += mask.fRowBytes;
348 } 348 }
349 } 349 }
350
351 ///////////////////////////////////////////////////////////////////////////////
352
353 SkA8_Coverage_Blitter::SkA8_Coverage_Blitter(const SkBitmap& device,
354 const SkPaint& paint) : SkRasterBlitter(device) {
355 SkASSERT(NULL == paint.getShader());
356 SkASSERT(NULL == paint.getXfermode());
357 SkASSERT(NULL == paint.getColorFilter());
358 }
359
360 void SkA8_Coverage_Blitter::blitAntiH(int x, int y, const SkAlpha antialias[],
361 const int16_t runs[]) {
362 SkASSERT(0 == x);
363
364 uint8_t* device = fDevice.getAddr8(x, y);
365 SkDEBUGCODE(int totalCount = 0;)
366
367 for (;;) {
368 int count = runs[0];
369 SkASSERT(count >= 0);
370 if (count == 0) {
371 return;
372 }
373 memset(device, antialias[0], count);
374 runs += count;
375 antialias += count;
376 device += count;
377
378 SkDEBUGCODE(totalCount += count;)
379 }
380 SkASSERT(fDevice.width() == totalCount);
381 }
382
383 void SkA8_Coverage_Blitter::blitH(int x, int y, int width) {
384 sk_throw();
385 }
386
387 void SkA8_Coverage_Blitter::blitV(int x, int y, int height, SkAlpha alpha) {
388 sk_throw();
389 }
390
391 void SkA8_Coverage_Blitter::blitRect(int x, int y, int width, int height) {
392 sk_throw();
393 }
394
395 void SkA8_Coverage_Blitter::blitMask(const SkMask&, const SkIRect&) {
396 sk_throw();
397 }
398
399 const SkBitmap* SkA8_Coverage_Blitter::justAnOpaqueColor(uint32_t*) {
400 sk_throw();
401 return NULL;
402 }
OLDNEW
« no previous file with comments | « src/core/SkBlitter.cpp ('k') | src/core/SkCoreBlitters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698