| 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 #include "SkLinearBitmapPipeline.h" | 8 #include "SkLinearBitmapPipeline.h" |
| 9 #include "SkColor.h" | 9 #include "SkColor.h" |
| 10 #include "SkPM4f.h" | 10 #include "SkPM4f.h" |
| 11 #include "Test.h" | 11 #include "Test.h" |
| 12 | 12 |
| 13 struct SinkBilerpProcessor final : public PointProcessorInterface { | 13 struct SinkBilerpProcessor final : public PointProcessorInterface { |
| 14 void pointListFew(int n, Sk4fArg xs, Sk4fArg ys) override { fXs = xs; fYs =
ys; } | 14 void pointListFew(int n, Sk4fArg xs, Sk4fArg ys) override { fXs = xs; fYs =
ys; } |
| 15 void pointList4(Sk4fArg Xs, Sk4fArg Ys) override { fXs = Xs; fYs = Ys; } | 15 void pointList4(Sk4fArg Xs, Sk4fArg Ys) override { fXs = Xs; fYs = Ys; } |
| 16 | 16 void pointSpan(SkPoint start, SkScalar length, int count) override { } |
| 17 Sk4f fXs; | 17 Sk4f fXs; |
| 18 Sk4f fYs; | 18 Sk4f fYs; |
| 19 }; | 19 }; |
| 20 | 20 |
| 21 using Pixel = float[4]; | 21 using Pixel = float[4]; |
| 22 DEF_TEST(SkBitmapFP, reporter) { | 22 DEF_TEST(SkBitmapFP, reporter) { |
| 23 | 23 |
| 24 int width = 10; | 24 int width = 10; |
| 25 int height = 10; | 25 int height = 10; |
| 26 uint32_t* bitmap = new uint32_t[width * height]; | 26 uint32_t* bitmap = new uint32_t[width * height]; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 57 pixelBuffer[i][1] * 255.0f, | 57 pixelBuffer[i][1] * 255.0f, |
| 58 pixelBuffer[i][2] * 255.0f, | 58 pixelBuffer[i][2] * 255.0f, |
| 59 pixelBuffer[i][3] * 255.0f); | 59 pixelBuffer[i][3] * 255.0f); |
| 60 } | 60 } |
| 61 #endif | 61 #endif |
| 62 | 62 |
| 63 delete [] bitmap; | 63 delete [] bitmap; |
| 64 delete [] FPbuffer; | 64 delete [] FPbuffer; |
| 65 } | 65 } |
| 66 | 66 |
| OLD | NEW |