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

Unified Diff: src/core/SkBlitter_ARGB32.cpp

Issue 1102363006: Revert of De-proc Color32 (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkBlitRow_D32.cpp ('k') | src/core/SkCoreBlitters.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBlitter_ARGB32.cpp
diff --git a/src/core/SkBlitter_ARGB32.cpp b/src/core/SkBlitter_ARGB32.cpp
index f2de82a2e9e2ea8cc2748a9a7ea851437771d03b..96280b7baa6f60baccbfecf368eaa693a2c30b98 100644
--- a/src/core/SkBlitter_ARGB32.cpp
+++ b/src/core/SkBlitter_ARGB32.cpp
@@ -52,6 +52,7 @@
fSrcB = SkAlphaMul(SkColorGetB(color), scale);
fPMColor = SkPackARGB32(fSrcA, fSrcR, fSrcG, fSrcB);
+ fColor32Proc = SkBlitRow::ColorProcFactory();
}
const SkBitmap* SkARGB32_Blitter::justAnOpaqueColor(uint32_t* value) {
@@ -71,7 +72,7 @@
SkASSERT(x >= 0 && y >= 0 && x + width <= fDevice.width());
uint32_t* device = fDevice.getAddr32(x, y);
- SkBlitRow::Color32(device, device, width, fPMColor);
+ fColor32Proc(device, device, width, fPMColor);
}
void SkARGB32_Blitter::blitAntiH(int x, int y, const SkAlpha antialias[],
@@ -96,7 +97,7 @@
sk_memset32(device, color, count);
} else {
uint32_t sc = SkAlphaMulQ(color, SkAlpha255To256(aa));
- SkBlitRow::Color32(device, device, count, sc);
+ fColor32Proc(device, device, count, sc);
}
}
runs += count;
@@ -108,7 +109,7 @@
void SkARGB32_Blitter::blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) {
uint32_t* device = fDevice.getAddr32(x, y);
SkDEBUGCODE((void)fDevice.getAddr32(x + 1, y);)
-
+
device[0] = SkBlendARGB32(fPMColor, device[0], a0);
device[1] = SkBlendARGB32(fPMColor, device[1], a1);
}
@@ -116,7 +117,7 @@
void SkARGB32_Blitter::blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) {
uint32_t* device = fDevice.getAddr32(x, y);
SkDEBUGCODE((void)fDevice.getAddr32(x, y + 1);)
-
+
device[0] = SkBlendARGB32(fPMColor, device[0], a0);
device = (uint32_t*)((char*)device + fDevice.rowBytes());
device[0] = SkBlendARGB32(fPMColor, device[0], a1);
@@ -247,7 +248,7 @@
size_t rowBytes = fDevice.rowBytes();
while (--height >= 0) {
- SkBlitRow::Color32(device, device, width, color);
+ fColor32Proc(device, device, width, color);
device = (uint32_t*)((char*)device + rowBytes);
}
}
@@ -300,7 +301,7 @@
void SkARGB32_Black_Blitter::blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) {
uint32_t* device = fDevice.getAddr32(x, y);
SkDEBUGCODE((void)fDevice.getAddr32(x, y + 1);)
-
+
device[0] = (a0 << SK_A32_SHIFT) + SkAlphaMulQ(device[0], 256 - a0);
device = (uint32_t*)((char*)device + fDevice.rowBytes());
device[0] = (a1 << SK_A32_SHIFT) + SkAlphaMulQ(device[0], 256 - a1);
« no previous file with comments | « src/core/SkBlitRow_D32.cpp ('k') | src/core/SkCoreBlitters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698