blob: 0d72d9bafe98319a2f7e3fbfa4b9201751acda01 [file] [log] [blame]
Brian Salomon92ce5942017-01-18 11:01:10 -05001/*
2 * Copyright 2017 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#include "GrProcessorSet.h"
9
10GrProcessorSet::GrProcessorSet(GrPaint&& paint) {
11 fXPFactory = paint.fXPFactory;
12 fColorFragmentProcessorCnt = paint.numColorFragmentProcessors();
13 fFragmentProcessors.reset(paint.numTotalFragmentProcessors());
14 int i = 0;
15 for (auto& fp : paint.fColorFragmentProcessors) {
16 fFragmentProcessors[i++] = fp.release();
17 }
18 for (auto& fp : paint.fCoverageFragmentProcessors) {
19 fFragmentProcessors[i++] = fp.release();
20 }
21}