| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkLinearBitmapPipeline_sampler_DEFINED | 8 #ifndef SkLinearBitmapPipeline_sampler_DEFINED |
| 9 #define SkLinearBitmapPipeline_sampler_DEFINED | 9 #define SkLinearBitmapPipeline_sampler_DEFINED |
| 10 | 10 |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 } | 191 } |
| 192 }; | 192 }; |
| 193 | 193 |
| 194 template <> | 194 template <> |
| 195 class PixelConverter<kRGBA_F16_SkColorType, kLinear_SkGammaType> { | 195 class PixelConverter<kRGBA_F16_SkColorType, kLinear_SkGammaType> { |
| 196 public: | 196 public: |
| 197 using Element = uint64_t; | 197 using Element = uint64_t; |
| 198 PixelConverter(const SkPixmap& srcPixmap) { } | 198 PixelConverter(const SkPixmap& srcPixmap) { } |
| 199 | 199 |
| 200 Sk4f toSk4f(const Element pixel) const { | 200 Sk4f toSk4f(const Element pixel) const { |
| 201 return SkHalfToFloat_01(pixel); | 201 return SkHalfToFloat_finite(pixel); |
| 202 } | 202 } |
| 203 }; | 203 }; |
| 204 | 204 |
| 205 class PixelAccessorShim { | 205 class PixelAccessorShim { |
| 206 public: | 206 public: |
| 207 explicit PixelAccessorShim(SkLinearBitmapPipeline::PixelAccessorInterface* a
ccessor) | 207 explicit PixelAccessorShim(SkLinearBitmapPipeline::PixelAccessorInterface* a
ccessor) |
| 208 : fPixelAccessor(accessor) { } | 208 : fPixelAccessor(accessor) { } |
| 209 | 209 |
| 210 void SK_VECTORCALL getFewPixels( | 210 void SK_VECTORCALL getFewPixels( |
| 211 int n, Sk4s xs, Sk4s ys, Sk4f* px0, Sk4f* px1, Sk4f* px2) const { | 211 int n, Sk4s xs, Sk4s ys, Sk4f* px0, Sk4f* px1, Sk4f* px2) const { |
| (...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 838 } | 838 } |
| 839 } | 839 } |
| 840 | 840 |
| 841 Next* const fNext; | 841 Next* const fNext; |
| 842 Accessor fAccessor; | 842 Accessor fAccessor; |
| 843 }; | 843 }; |
| 844 | 844 |
| 845 } // namespace | 845 } // namespace |
| 846 | 846 |
| 847 #endif // SkLinearBitmapPipeline_sampler_DEFINED | 847 #endif // SkLinearBitmapPipeline_sampler_DEFINED |
| OLD | NEW |