blob: 707a33ae6f8cdf09fe9b3a12832478f05e07b832 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
/*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkOpts.h"
#include "SkRasterPipeline.h"
SkRasterPipeline::SkRasterPipeline() {}
void SkRasterPipeline::append(StockStage stage, void* ctx) {
SkASSERT(fNum < (int)SK_ARRAY_COUNT(fStages));
fStages[fNum++] = { stage, ctx };
}
void SkRasterPipeline::extend(const SkRasterPipeline& src) {
for (int i = 0; i < src.fNum; i++) {
const Stage& s = src.fStages[i];
this->append(s.stage, s.ctx);
}
}
void SkRasterPipeline::run(size_t x, size_t n) const {
SkOpts::run_pipeline(x,n, fStages, fNum);
}
|