aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkBlitRow.h
diff options
context:
space:
mode:
authorGravatar senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2010-12-16 19:07:45 +0000
committerGravatar senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2010-12-16 19:07:45 +0000
commit29e5054dd07c97c2195c5f64bf67aaa6b5afa204 (patch)
treebdd024a5cce23ce7f26151fe09b6e4a0d5f8ede4 /include/core/SkBlitRow.h
parent31e623003472d98d8623b72b8535220c400c4058 (diff)
Fix perf regression in Color32.
The regression was due to the fact that we were calling PlatformColorProc() for every span (which in turns makes CPUID, a fairly expensive call). Since we draw a lot of rects, and rects have 1-pixel wide spans for the vertical segments, that's a lot of CPUID. Fixed by cacheing the result of PlatformColorProc(), as is done for the other platform-specific blitters. Review URL: http://codereview.appspot.com/3669042/ git-svn-id: http://skia.googlecode.com/svn/trunk@636 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkBlitRow.h')
-rw-r--r--include/core/SkBlitRow.h14
1 files changed, 3 insertions, 11 deletions
diff --git a/include/core/SkBlitRow.h b/include/core/SkBlitRow.h
index a592167f70..2b652c2d29 100644
--- a/include/core/SkBlitRow.h
+++ b/include/core/SkBlitRow.h
@@ -55,24 +55,16 @@ public:
const SkPMColor* SK_RESTRICT src,
int count, U8CPU alpha);
- static void Color32_BlitRow32(SkPMColor dst[], const SkPMColor src[],
- int count, SkPMColor color);
-
static Proc32 Factory32(unsigned flags32);
/** Blend a single color onto a row of S32 pixels, writing the result
into a row of D32 pixels. src and dst may be the same memory, but
if they are not, they may not overlap.
*/
- static void Color32(SkPMColor dst[], const SkPMColor src[], int count,
- SkPMColor color);
+ static void Color32(SkPMColor dst[], const SkPMColor src[],
+ int count, SkPMColor color);
- /** Blend a single color onto a row of 32bit pixels, writing the result
- into the same row.
- */
- static void Color32(SkPMColor row[], int count, SkPMColor color) {
- Color32(row, row, count, color);
- }
+ static ColorProc ColorProcFactory();
/** These static functions are called by the Factory and Factory32
functions, and should return either NULL, or a