diff options
Diffstat (limited to 'src/gpu/GrProcessorSet.cpp')
-rw-r--r-- | src/gpu/GrProcessorSet.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/gpu/GrProcessorSet.cpp b/src/gpu/GrProcessorSet.cpp new file mode 100644 index 0000000000..0d72d9bafe --- /dev/null +++ b/src/gpu/GrProcessorSet.cpp @@ -0,0 +1,21 @@ +/* + * Copyright 2017 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "GrProcessorSet.h" + +GrProcessorSet::GrProcessorSet(GrPaint&& paint) { + fXPFactory = paint.fXPFactory; + fColorFragmentProcessorCnt = paint.numColorFragmentProcessors(); + fFragmentProcessors.reset(paint.numTotalFragmentProcessors()); + int i = 0; + for (auto& fp : paint.fColorFragmentProcessors) { + fFragmentProcessors[i++] = fp.release(); + } + for (auto& fp : paint.fCoverageFragmentProcessors) { + fFragmentProcessors[i++] = fp.release(); + } +} |