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

Issue 1245273005: Revert of De-templatize Sk4pxXfermode code a bit. (Closed)

Created:
5 years, 5 months ago by mtklein
Modified:
5 years, 5 months ago
Reviewers:
msarett, mtklein_C
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Revert of De-templatize Sk4pxXfermode code a bit. (patchset #2 id:20001 of https://codereview.chromium.org/1242743004/) Reason for revert: http://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu-GCC-Arm7-Debug-Android_NoNeon/builds/1168/steps/build%20most/logs/stdio Original issue's description: > De-templatize Sk4pxXfermode code a bit. > > This deduplicates a few pieces of code: > - we end up with one copy of each xfer32() driver loop instead of one per xfermode; > - we end up with two* copies of each xfermode implementation instead of ten**. > > * For a given Mode: Mode() itself and xfer_aa<Mode>(). > ** From unrolling: twice at a stride of 8, once at 4, once at 2, and once at 1, then all again for when we have AA. > > This decreases the size of SkXfermode.o from 1.5M to 620K on x86-64 and from 1.3M to 680K on ARMv7+NEON. > > If we wanted to, we could eliminate the xfer_aa<Mode>() copy by tagging each Mode() function as __attribute__((noinline)) or its equivalent. This would result in another ~100K space savings. > > Performance is affected in proportion to the original xfermode speed: > fast modes like Plus take the largest proportional hit, and slow modes > like HardLight or SoftLight see essentially no hit at all. > > This adds SK_VECTORCALL to help keep this code fast on ARMv7 and Windows. I've looked at the ARMv7 generated code... it looks good, even pretty. > > For compatibility with SK_VECTORCALL, we now pass the vector-sized arguments by value instead of by reference. Some refactoring now allows us to declare each mode as just a static function instead of a struct, which simplifies things. > > TBR=reed@google.com > No public API changes. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/e617e1525916d7ee684142728c0905828caf49da TBR=msarett@google.com,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Committed: https://skia.googlesource.com/skia/+/654ad19fbd5a295c4bd3072dc8a7b88f212bbd49

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -71 lines) Patch
M include/core/SkPostConfig.h View 1 chunk +0 lines, -8 lines 0 comments Download
M src/core/Sk4pxXfermode.h View 7 chunks +64 lines, -63 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
mtklein
Created Revert of De-templatize Sk4pxXfermode code a bit.
5 years, 5 months ago (2015-07-21 19:07:41 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1245273005/1
5 years, 5 months ago (2015-07-21 19:07:52 UTC) #2
commit-bot: I haz the power
5 years, 5 months ago (2015-07-21 19:08:43 UTC) #3
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://skia.googlesource.com/skia/+/654ad19fbd5a295c4bd3072dc8a7b88f212bbd49

Powered by Google App Engine
This is Rietveld 408576698