aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBlitter_ARGB32.cpp
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-02-25 12:52:57 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-02-25 12:52:57 -0800
commitedeccc58606e0421a1ae275e391ee4347c6f52f6 (patch)
tree1e0801033607b4245ab407d05fb42dc07e037fb0 /src/core/SkBlitter_ARGB32.cpp
parent59c9203321cf4afb48597f39e4bdd4ae91da12a0 (diff)
Clean up ColorRectProc plumbing.
We've always been using the portable ColorRect32, so we don't need the ColorRectProc plumbing. Furthermore, ColorRect32 doesn't seem to be very important (we're only using it in the opaque case, which our row-by-row procs already specialize for). Remove that too. If we find we want specialization for really narrow rects again, let's put it in blitRect() directly. It's pretty unlikely we're going to get platform-specific speedup for blits to non-contiguous memory. My local SKP comparison is +- 3%... most neutral I've ever seen. BUG=skia: Review URL: https://codereview.chromium.org/959873002
Diffstat (limited to 'src/core/SkBlitter_ARGB32.cpp')
-rw-r--r--src/core/SkBlitter_ARGB32.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/core/SkBlitter_ARGB32.cpp b/src/core/SkBlitter_ARGB32.cpp
index f86bc47074..bbad6c7926 100644
--- a/src/core/SkBlitter_ARGB32.cpp
+++ b/src/core/SkBlitter_ARGB32.cpp
@@ -53,7 +53,6 @@ SkARGB32_Blitter::SkARGB32_Blitter(const SkBitmap& device, const SkPaint& paint)
fPMColor = SkPackARGB32(fSrcA, fSrcR, fSrcG, fSrcB);
fColor32Proc = SkBlitRow::ColorProcFactory();
- fColorRect32Proc = SkBlitRow::ColorRectProcFactory();
}
const SkBitmap* SkARGB32_Blitter::justAnOpaqueColor(uint32_t* value) {
@@ -214,13 +213,9 @@ void SkARGB32_Blitter::blitRect(int x, int y, int width, int height) {
uint32_t color = fPMColor;
size_t rowBytes = fDevice.rowBytes();
- if (255 == SkGetPackedA32(color)) {
- fColorRect32Proc(device, width, height, rowBytes, color);
- } else {
- while (--height >= 0) {
- fColor32Proc(device, device, width, color);
- device = (uint32_t*)((char*)device + rowBytes);
- }
+ while (--height >= 0) {
+ fColor32Proc(device, device, width, color);
+ device = (uint32_t*)((char*)device + rowBytes);
}
}