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

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

Issue 2100323002: Reduce size of LinearBitmapPipeline (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Sync with new SK_VECTORCALL. 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/SkLinearBitmapPipeline.cpp ('k') | src/core/SkLinearBitmapPipeline_sample.h » ('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_core_DEFINED 8 #ifndef SkLinearBitmapPipeline_core_DEFINED
9 #define SkLinearBitmapPipeline_core_DEFINED 9 #define SkLinearBitmapPipeline_core_DEFINED
10 10
11 #include <algorithm>
11 #include <cmath> 12 #include <cmath>
12 #include "SkNx.h" 13 #include "SkNx.h"
13 14
14 // New bilerp strategy: 15 // New bilerp strategy:
15 // Pass through on bilerpList4 and bilerpListFew (analogs to pointList), introdu ce bilerpEdge 16 // Pass through on bilerpList4 and bilerpListFew (analogs to pointList), introdu ce bilerpEdge
16 // which takes 4 points. If the sample spans an edge, then break it into a biler pEdge. Bilerp 17 // which takes 4 points. If the sample spans an edge, then break it into a biler pEdge. Bilerp
17 // span then becomes a normal span except in special cases where an extra Y is g iven. The bilerp 18 // span then becomes a normal span except in special cases where an extra Y is g iven. The bilerp
18 // need to stay single point calculations until the tile layer. 19 // need to stay single point calculations until the tile layer.
19 // TODO: 20 // TODO:
20 // - edge span predicate. 21 // - edge span predicate.
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 virtual void setDestination(void* dst, int count) = 0; 232 virtual void setDestination(void* dst, int count) = 0;
232 }; 233 };
233 234
234 class SkLinearBitmapPipeline::BlendProcessorInterface 235 class SkLinearBitmapPipeline::BlendProcessorInterface
235 : public SkLinearBitmapPipeline::DestinationInterface { 236 : public SkLinearBitmapPipeline::DestinationInterface {
236 public: 237 public:
237 virtual void SK_VECTORCALL blendPixel(Sk4f pixel0) = 0; 238 virtual void SK_VECTORCALL blendPixel(Sk4f pixel0) = 0;
238 virtual void SK_VECTORCALL blend4Pixels(Sk4f p0, Sk4f p1, Sk4f p2, Sk4f p3) = 0; 239 virtual void SK_VECTORCALL blend4Pixels(Sk4f p0, Sk4f p1, Sk4f p2, Sk4f p3) = 0;
239 }; 240 };
240 241
242 class SkLinearBitmapPipeline::PixelAccessorInterface {
243 public:
244 virtual ~PixelAccessorInterface() { }
245 virtual void SK_VECTORCALL getFewPixels(
246 int n, Sk4s xs, Sk4s ys, Sk4f* px0, Sk4f* px1, Sk4f* px2) const = 0;
247
248 virtual void SK_VECTORCALL get4Pixels(
249 Sk4s xs, Sk4s ys, Sk4f* px0, Sk4f* px1, Sk4f* px2, Sk4f* px3) const = 0;
250
251 virtual void get4Pixels(
252 const void* src, int index, Sk4f* px0, Sk4f* px1, Sk4f* px2, Sk4f* px3) const = 0;
253
254 virtual Sk4f getPixelFromRow(const void* row, int index) const = 0;
255
256 virtual Sk4f getPixelAt(int index) const = 0;
257
258 virtual const void* row(int y) const = 0;
259 };
260
241 #endif // SkLinearBitmapPipeline_core_DEFINED 261 #endif // SkLinearBitmapPipeline_core_DEFINED
OLDNEW
« no previous file with comments | « src/core/SkLinearBitmapPipeline.cpp ('k') | src/core/SkLinearBitmapPipeline_sample.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698