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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 } | 178 } |
179 }; | 179 }; |
180 | 180 |
181 template <> | 181 template <> |
182 class PixelConverter<kRGBA_F16_SkColorType, kLinear_SkGammaType> { | 182 class PixelConverter<kRGBA_F16_SkColorType, kLinear_SkGammaType> { |
183 public: | 183 public: |
184 using Element = uint64_t; | 184 using Element = uint64_t; |
185 PixelConverter(const SkPixmap& srcPixmap) { } | 185 PixelConverter(const SkPixmap& srcPixmap) { } |
186 | 186 |
187 Sk4f toSk4f(const Element pixel) const { | 187 Sk4f toSk4f(const Element pixel) const { |
188 return SkHalfToFloat_finite(pixel); | 188 return SkHalfToFloat_finite_ftz(pixel); |
189 } | 189 } |
190 }; | 190 }; |
191 | 191 |
192 class PixelAccessorShim { | 192 class PixelAccessorShim { |
193 public: | 193 public: |
194 explicit PixelAccessorShim(SkLinearBitmapPipeline::PixelAccessorInterface* a
ccessor) | 194 explicit PixelAccessorShim(SkLinearBitmapPipeline::PixelAccessorInterface* a
ccessor) |
195 : fPixelAccessor(accessor) { } | 195 : fPixelAccessor(accessor) { } |
196 | 196 |
197 void SK_VECTORCALL getFewPixels( | 197 void SK_VECTORCALL getFewPixels( |
198 int n, Sk4i xs, Sk4i ys, Sk4f* px0, Sk4f* px1, Sk4f* px2) const { | 198 int n, Sk4i xs, Sk4i ys, Sk4f* px0, Sk4f* px1, Sk4f* px2) const { |
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1027 const SkShader::TileMode fXEdgeType; | 1027 const SkShader::TileMode fXEdgeType; |
1028 const int fXMax; | 1028 const int fXMax; |
1029 const SkShader::TileMode fYEdgeType; | 1029 const SkShader::TileMode fYEdgeType; |
1030 const int fYMax; | 1030 const int fYMax; |
1031 Accessor fAccessor; | 1031 Accessor fAccessor; |
1032 }; | 1032 }; |
1033 | 1033 |
1034 } // namespace | 1034 } // namespace |
1035 | 1035 |
1036 #endif // SkLinearBitmapPipeline_sampler_DEFINED | 1036 #endif // SkLinearBitmapPipeline_sampler_DEFINED |
OLD | NEW |