Commit Graph

8 Commits

Author SHA1 Message Date
Mike Klein
c0bd9f9fe5 rewrite includes to not need so much -Ifoo
Current strategy: everything from the top

Things to look at first are the manual changes:

   - added tools/rewrite_includes.py
   - removed -Idirectives from BUILD.gn
   - various compile.sh simplifications
   - tweak tools/embed_resources.py
   - update gn/find_headers.py to write paths from the top
   - update gn/gn_to_bp.py SkUserConfig.h layout
     so that #include "include/config/SkUserConfig.h" always
     gets the header we want.

No-Presubmit: true
Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-04-24 16:27:11 +00:00
Mike Klein
6e78ae5525 Reland "have SkConvertPixels use SkColorSpaceXformSteps"
This is a reland of 6d0e566e94

On second thought, it's probably better to correct the
types of the swizzle functions to express their required alignment.
This is a more involved CL, but I think leaves things better off.

Original change's description:
> have SkConvertPixels use SkColorSpaceXformSteps
>
> This ought to allow the fast paths in more cases, e.g. memcpy() when
> both src and dst are the same format.  Today if we tag a dst color space
> at all, we'll think we need to fall back to the general case pipeline.
>
> Some refactoring too, but no big functional change beyond using steps.
>
> Change-Id: I8fa01025229e3b9418e7f43241a2f03628a97288
> Reviewed-on: https://skia-review.googlesource.com/155640
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

Change-Id: Ia17d93acfe88a36c4c36d29e3a0b243f91178b61
Reviewed-on: https://skia-review.googlesource.com/156241
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-09-21 16:18:06 +00:00
msarett
c5c322d8ec Optimize CMYK->RGBA (BGRA) transform for jpeg decodes
Swizzle Bench Runtime
Nexus 6P     0.14x
Dell Venue 8 0.12x

CMYK Jpeg Decode Runtime
Nexus 6P     0.81x
Dell Venue 8 0.85x

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1676773003
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1676773003
2016-02-08 13:26:25 -08:00
msarett
095742419d SSE optimizations for GrayAlpha -> RGBA/BGRA Premul/Unpremul
Swizzle Runtime (Dell Venue 8)
Unpremul 0.17x
Premul   0.20x

PNG Decode Runtime on GrayAlpha Encoded PNGs (Dell Venue 8)
Unpremul Regular  0.91x
Unpremul ZeroInit 0.92x
Premul   Regular  0.84x
Premul   ZeroInit 0.85x

BUG=skia:4767
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1666853002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1666853002
2016-02-03 15:28:35 -08:00
msarett
2eff71c9b5 NEON optimizations for gray -> RGBA (or BGRA) conversions
Swizzle Bench Runtime
Nexus 6P 0.32x
Nexus 9  0.89x

PNG Decode Time (for test set of gray encoded PNGs)
Nexus 6P 0.88x
Nexus 9  0.91x

BUG=skia:4767
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1656383002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1656383002
2016-02-02 12:59:45 -08:00
msarett
f1b8b6ae34 Use NEON optimizations for RGB -> RGB(FF) or BGR(FF) in SkSwizzler
Swizzle Bench Runtime Nexus 6P
xxx_xxxa        0.32x
xxx_swaprb_xxxa 0.31x

Swizzle Bench Runtime Nexus 9
xxx_xxxa        1.11x
xxx_swaprb_xxxa 1.14x
(This is a slow down.)

Swizzle Bench Runtime Nexus 5
xxx_xxxa        0.12x
xxx_swaprb      0.12x

RGB PNG Decode Runtime
Nexus 6P        0.94x
Nexus 9         0.98x

I don't know how to explain the fact that the Swizzle Bench was
slower on Nexus 9, but the decode times got faster.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1618003002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1618003002
2016-01-22 09:54:21 -08:00
mtklein
8bf7b79cf9 Refactor swizzle names and types.
- Plant a flag to say "pretend all the inputs are RGBA".
    This is how libpng thinks.
    This is the opposite of what the implementation had been doing,
    so I've rearranged everything to reflect the new orientation.

  - Rewrite the names to be less mysterious looking.  No more Xs.

  - Make the src type uniformly const void*, to allow for 888 (RGB) srcs.

This should be performance and pixel neutral.  (Please revert if it's not.)

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1626463002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1626463002
2016-01-22 07:42:53 -08:00
mtklein
55c86abedc test+bench new swizzle SkOpts
BUG=skia:skia:4767
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1564233002

Review URL: https://codereview.chromium.org/1564233002
2016-01-08 06:32:52 -08:00