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

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

Issue 2149443002: SkRasterPipeline: simplify impl and remove need to rewire stages (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: comments 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 | « no previous file | src/core/SkRasterPipeline.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 SkRasterPipeline_DEFINED 8 #ifndef SkRasterPipeline_DEFINED
9 #define SkRasterPipeline_DEFINED 9 #define SkRasterPipeline_DEFINED
10 10
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 } 89 }
90 90
91 // Most 4 pixel or 1 pixel variants share the same context pointer. 91 // Most 4 pixel or 1 pixel variants share the same context pointer.
92 void append(Fn body, Fn tail, const void* ctx = nullptr) { 92 void append(Fn body, Fn tail, const void* ctx = nullptr) {
93 this->append(body, ctx, tail, ctx); 93 this->append(body, ctx, tail, ctx);
94 } 94 }
95 95
96 private: 96 private:
97 using Stages = SkSTArray<10, Stage, /*MEM_COPY=*/true>; 97 using Stages = SkSTArray<10, Stage, /*MEM_COPY=*/true>;
98 98
99 // This no-op default makes fBodyStart and fTailStart unconditionally safe t o call,
100 // and is always the last stage's fNext as a sort of safety net to make sure even a
101 // buggy pipeline can't walk off its own end.
102 static void SK_VECTORCALL JustReturn(Stage*, size_t, Sk4f,Sk4f,Sk4f,Sk4f,
103 Sk4f,Sk4f,Sk4f,Sk4f);
104
99 Stages fBody, 105 Stages fBody,
100 fTail; 106 fTail;
101 bool fReadyToRun = false; 107 Fn fBodyStart = &JustReturn,
108 fTailStart = &JustReturn;
102 }; 109 };
103 110
104 #endif//SkRasterPipeline_DEFINED 111 #endif//SkRasterPipeline_DEFINED
OLDNEW
« no previous file with comments | « no previous file | src/core/SkRasterPipeline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698