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

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

Issue 2151023003: Revert of Expand _01 half<->float limitation to _finite. Simplify. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_finite(pixel); 201 return SkHalfToFloat_01(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
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
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