Brian Salomon | 92ce594 | 2017-01-18 11:01:10 -0500 | [diff] [blame^] | 1 | /* |
| 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 | |
| 10 | GrProcessorSet::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 | } |