Reason for revert:
need to revert this along with reverting the big unitmapper cl
Original issue's description:
> Fix compilation error when building with clang on Linux.
>
> ../../src/effects/gradients/SkGradientShader.cpp:487:22: error: unused
> function 'bitsTo16' [-Werror,-Wunused-function]
> static inline U16CPU bitsTo16(unsigned x, const unsigned bits) {
>
> R=bsalomon@google.com
> TEST=make tests
>
> Committed: http://code.google.com/p/skia/source/detail?r=14835
R=bsalomon@google.com, reed@google.com, tfarina@chromium.org
TBR=bsalomon@google.com, reed@google.com, tfarina@chromium.org
NOTREECHECKS=true
NOTRY=true
Author: reed@chromium.org
Review URL: https://codereview.chromium.org/
297803010
git-svn-id: http://skia.googlecode.com/svn/trunk@14839
2bbb7eff-a529-9590-31e7-
b0007b416f81
return x - (x >> 16);
}
+static inline U16CPU bitsTo16(unsigned x, const unsigned bits) {
+ SkASSERT(x < (1U << bits));
+ if (6 == bits) {
+ return (x << 10) | (x << 4) | (x >> 2);
+ }
+ if (8 == bits) {
+ return (x << 8) | x;
+ }
+ sk_throw();
+ return 0;
+}
+
const uint16_t* SkGradientShaderBase::GradientShaderCache::getCache16() {
SkOnce(&fCache16Inited, &fCache16Mutex, SkGradientShaderBase::GradientShaderCache::initCache16,
this);