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

Unified Diff: src/core/SkBlitter_A8.cpp

Issue 56453002: speed up A8 (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 side-by-side diff with in-line comments
Download patch
Index: src/core/SkBlitter_A8.cpp
diff --git a/src/core/SkBlitter_A8.cpp b/src/core/SkBlitter_A8.cpp
index 7fca29ecf5d0c2e31c12b0fe9b01bdceba74d8e6..c524d0af0612858214ff0a0a805070bd159ff51d 100644
--- a/src/core/SkBlitter_A8.cpp
+++ b/src/core/SkBlitter_A8.cpp
@@ -347,3 +347,56 @@ void SkA8_Shader_Blitter::blitMask(const SkMask& mask, const SkIRect& clip) {
alpha += mask.fRowBytes;
}
}
+
+///////////////////////////////////////////////////////////////////////////////
+
+SkA8_Coverage_Blitter::SkA8_Coverage_Blitter(const SkBitmap& device,
+ const SkPaint& paint) : SkRasterBlitter(device) {
+ SkASSERT(NULL == paint.getShader());
+ SkASSERT(NULL == paint.getXfermode());
+ SkASSERT(NULL == paint.getColorFilter());
+}
+
+void SkA8_Coverage_Blitter::blitAntiH(int x, int y, const SkAlpha antialias[],
+ const int16_t runs[]) {
+ SkASSERT(0 == x);
+
+ uint8_t* device = fDevice.getAddr8(x, y);
+ SkDEBUGCODE(int totalCount = 0;)
+
+ for (;;) {
+ int count = runs[0];
+ SkASSERT(count >= 0);
+ if (count == 0) {
+ return;
+ }
+ memset(device, antialias[0], count);
+ runs += count;
+ antialias += count;
+ device += count;
+
+ SkDEBUGCODE(totalCount += count;)
+ }
+ SkASSERT(fDevice.width() == totalCount);
+}
+
+void SkA8_Coverage_Blitter::blitH(int x, int y, int width) {
+ sk_throw();
+}
+
+void SkA8_Coverage_Blitter::blitV(int x, int y, int height, SkAlpha alpha) {
+ sk_throw();
+}
+
+void SkA8_Coverage_Blitter::blitRect(int x, int y, int width, int height) {
+ sk_throw();
+}
+
+void SkA8_Coverage_Blitter::blitMask(const SkMask&, const SkIRect&) {
+ sk_throw();
+}
+
+const SkBitmap* SkA8_Coverage_Blitter::justAnOpaqueColor(uint32_t*) {
+ sk_throw();
+ return NULL;
+}
« no previous file with comments | « src/core/SkBlitter.cpp ('k') | src/core/SkCoreBlitters.h » ('j') | src/core/SkCoreBlitters.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698