Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Side by Side Diff: src/core/SkLinearBitmapPipeline_sample.h

Issue 2256023002: Flush denorm half floats to zero. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix threshold, clean up tests Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/core/SkHalf.h ('k') | src/core/SkMipMap.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/core/SkHalf.h ('k') | src/core/SkMipMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698