diff options
author | 2015-08-06 08:17:16 -0700 | |
---|---|---|
committer | 2015-08-06 08:17:16 -0700 | |
commit | b6394746ff546a9c60d68e3be162cb38feffa803 (patch) | |
tree | 0f9be15fea6e6280df426e6e09d201e16459a0e5 /src/core | |
parent | d0cf9d831f7f4c98d48f52e6850db4ade1dd9422 (diff) |
Port SkTextureCompression opts to SkOpts
Pretty vanilla translation. I cleaned up who calls whom a little.
Used to be utils -> opts -> utils, now it's just utils -> opts.
I may follow up with a pass over the NEON code for readability
and to clean up dead code.
This turns on NEON A8->R11EAC conversion for ARMv8.
Unit tests which now hit the NEON code still pass.
I can't find any related bench.
BUG=skia:4117
Review URL: https://codereview.chromium.org/1273103002
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkOpts.cpp | 4 | ||||
-rw-r--r-- | src/core/SkOpts.h | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/core/SkOpts.cpp b/src/core/SkOpts.cpp index 86981b9cf9..17eab7e51c 100644 --- a/src/core/SkOpts.cpp +++ b/src/core/SkOpts.cpp @@ -12,6 +12,7 @@ #include "SkBlurImageFilter_opts.h" #include "SkFloatingPoint_opts.h" #include "SkMorphologyImageFilter_opts.h" +#include "SkTextureCompressor_opts.h" #include "SkUtils_opts.h" #include "SkXfermode_opts.h" @@ -46,6 +47,9 @@ namespace SkOpts { decltype( erode_x) erode_x = portable::erode_x; decltype( erode_y) erode_y = portable::erode_y; + decltype(texture_compressor) texture_compressor = portable::texture_compressor; + decltype(fill_block_dimensions) fill_block_dimensions = portable::fill_block_dimensions; + // Each Init_foo() is defined in src/opts/SkOpts_foo.cpp. void Init_sse2(); void Init_ssse3(); diff --git a/src/core/SkOpts.h b/src/core/SkOpts.h index dad16b93d5..206b7ff655 100644 --- a/src/core/SkOpts.h +++ b/src/core/SkOpts.h @@ -8,6 +8,7 @@ #ifndef SkOpts_DEFINED #define SkOpts_DEFINED +#include "SkTextureCompressor.h" #include "SkTypes.h" #include "SkXfermode.h" @@ -36,6 +37,12 @@ namespace SkOpts { typedef void (*Morph)(const SkPMColor*, SkPMColor*, int, int, int, int, int); extern Morph dilate_x, dilate_y, erode_x, erode_y; + + typedef bool (*TextureCompressor)(uint8_t* dst, const uint8_t* src, + int width, int height, size_t rowBytes); + extern TextureCompressor (*texture_compressor)(SkColorType, SkTextureCompressor::Format); + extern bool (*fill_block_dimensions)(SkTextureCompressor::Format, int* x, int* y); + } #endif//SkOpts_DEFINED |