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

Side by Side Diff: tests/SkLinearBitmapPipelineTest.cpp

Issue 1723683002: Better encapsulation and vector calling convention. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Make inlines VECTORCALL. Created 4 years, 10 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
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 #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 {
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; }
16 void pointSpan(SkPoint start, SkScalar length, int count) override { }
17 Sk4f fXs;
18 Sk4f fYs;
19 };
20
21 using Pixel = float[4]; 13 using Pixel = float[4];
22 DEF_TEST(SkBitmapFP, reporter) { 14 DEF_TEST(SkBitmapFP, reporter) {
23 15
24 int width = 10; 16 int width = 10;
25 int height = 10; 17 int height = 10;
26 uint32_t* bitmap = new uint32_t[width * height]; 18 uint32_t* bitmap = new uint32_t[width * height];
27 for (int y = 0; y < height; y++) { 19 for (int y = 0; y < height; y++) {
28 for (int x = 0; x < width; x++) { 20 for (int x = 0; x < width; x++) {
29 bitmap[y * width + x] = (y << 8) + x + (128<<24); 21 bitmap[y * width + x] = (y << 8) + x + (128<<24);
30 } 22 }
(...skipping 26 matching lines...) Expand all
57 pixelBuffer[i][1] * 255.0f, 49 pixelBuffer[i][1] * 255.0f,
58 pixelBuffer[i][2] * 255.0f, 50 pixelBuffer[i][2] * 255.0f,
59 pixelBuffer[i][3] * 255.0f); 51 pixelBuffer[i][3] * 255.0f);
60 } 52 }
61 #endif 53 #endif
62 54
63 delete [] bitmap; 55 delete [] bitmap;
64 delete [] FPbuffer; 56 delete [] FPbuffer;
65 } 57 }
66 58
OLDNEW
« src/core/SkLinearBitmapPipeline.cpp ('K') | « src/core/SkLinearBitmapPipeline.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698