diff options
author | Leon Scroggins III <scroggo@google.com> | 2017-10-02 16:28:49 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-10-03 12:35:58 +0000 |
commit | 862c19675edb26ed7cba56ae6ca9f98c1e4cbef1 (patch) | |
tree | 446fecbce607a64102f08b43fdd6975e5052efdc /src/codec/SkSwizzler.cpp | |
parent | dd7ffa5a557bcaa1daebd0f056a8f1bafb992d4d (diff) |
Remove static initializers in SkCodec
Bug: 768878
Switch const declarations to constexpr where appropriate. Speculative
fix for crbug.com/768878.
Change-Id: I7fc356e623ce7a0f2b87e92e9a8ed95d5c423d79
Reviewed-on: https://skia-review.googlesource.com/54101
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Chris Blume <cblume@chromium.org>
Diffstat (limited to 'src/codec/SkSwizzler.cpp')
-rw-r--r-- | src/codec/SkSwizzler.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/codec/SkSwizzler.cpp b/src/codec/SkSwizzler.cpp index 8d865daaf9..84bb09702b 100644 --- a/src/codec/SkSwizzler.cpp +++ b/src/codec/SkSwizzler.cpp @@ -154,14 +154,14 @@ static void swizzle_bit_to_565( static void swizzle_bit_to_f16( void* SK_RESTRICT dstRow, const uint8_t* SK_RESTRICT src, int dstWidth, int bpp, int deltaSrc, int offset, const SkPMColor* /*ctable*/) { - static const uint64_t kWhite = (((uint64_t) SK_Half1) << 0) | - (((uint64_t) SK_Half1) << 16) | - (((uint64_t) SK_Half1) << 32) | - (((uint64_t) SK_Half1) << 48); - static const uint64_t kBlack = (((uint64_t) 0) << 0) | - (((uint64_t) 0) << 16) | - (((uint64_t) 0) << 32) | - (((uint64_t) SK_Half1) << 48); + constexpr uint64_t kWhite = (((uint64_t) SK_Half1) << 0) | + (((uint64_t) SK_Half1) << 16) | + (((uint64_t) SK_Half1) << 32) | + (((uint64_t) SK_Half1) << 48); + constexpr uint64_t kBlack = (((uint64_t) 0) << 0) | + (((uint64_t) 0) << 16) | + (((uint64_t) 0) << 32) | + (((uint64_t) SK_Half1) << 48); uint64_t* SK_RESTRICT dst = (uint64_t*) dstRow; |