diff options
author | 2014-07-11 12:12:27 -0700 | |
---|---|---|
committer | 2014-07-11 12:12:27 -0700 | |
commit | bc9205be0a1094e312da098348601398c210dc5a (patch) | |
tree | fe774dd7a483e24d4b5034c36db8a15ecfdc5096 /src/utils/SkTextureCompressor.h | |
parent | 5d9d10e8217d2138b5514a4d4216f95373240942 (diff) |
Add support for NEON intrinsics to speed up texture compression. We can
now convert the time that we would have spent uploading the texture to
compressing it giving a net 50% memory savings for these things.
R=robertphillips@google.com, mtklein@google.com, kevin.petit@arm.com
Author: krajcevski@google.com
Review URL: https://codereview.chromium.org/390453002
Diffstat (limited to 'src/utils/SkTextureCompressor.h')
-rw-r--r-- | src/utils/SkTextureCompressor.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/utils/SkTextureCompressor.h b/src/utils/SkTextureCompressor.h index 35b9b86430..ec6153ace9 100644 --- a/src/utils/SkTextureCompressor.h +++ b/src/utils/SkTextureCompressor.h @@ -34,7 +34,14 @@ namespace SkTextureCompressor { // large enough to hold width*height pixels. The dst data is expected to // be large enough to hold the compressed data according to the format. bool CompressBufferToFormat(uint8_t* dst, const uint8_t* src, SkColorType srcColorType, - int width, int height, int rowBytes, Format format); + int width, int height, int rowBytes, Format format, + bool opt = true /* Use optimization if available */); + + // This typedef defines what the nominal aspects of a compression function + // are. The typedef is not meant to be used by clients of the API, but rather + // allows SIMD optimized compression functions to be implemented. + typedef bool (*CompressionProc)(uint8_t* dst, const uint8_t* src, + int width, int height, int rowBytes); } #endif |