aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrProcessorSet.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-07-14 12:00:13 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-14 16:22:04 +0000
commit82ddc94aff0c8400a35f8006ee448574347c0c28 (patch)
treee608a3eefb5874cac7689e55d74f2be3708af18b /src/gpu/GrProcessorSet.cpp
parentb4b8a46448d819ed09dec1509335210526fe1292 (diff)
Make ProcessorRefTests op be a non-legacy GrMeshDrawOp
Change-Id: I80f8a7bad1fb8d499a3fec879ddd29ebbefe1eb6 Reviewed-on: https://skia-review.googlesource.com/23324 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrProcessorSet.cpp')
-rw-r--r--src/gpu/GrProcessorSet.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gpu/GrProcessorSet.cpp b/src/gpu/GrProcessorSet.cpp
index 152b97db53..c476f64fd6 100644
--- a/src/gpu/GrProcessorSet.cpp
+++ b/src/gpu/GrProcessorSet.cpp
@@ -43,6 +43,16 @@ GrProcessorSet::GrProcessorSet(SkBlendMode mode)
, fFragmentProcessorOffset(0)
, fFlags(0) {}
+GrProcessorSet::GrProcessorSet(sk_sp<GrFragmentProcessor> colorFP)
+ : fFragmentProcessors(1)
+ , fXP((const GrXPFactory*)nullptr)
+ , fColorFragmentProcessorCnt(1)
+ , fFragmentProcessorOffset(0)
+ , fFlags(0) {
+ SkASSERT(colorFP);
+ fFragmentProcessors[0] = colorFP.release();
+}
+
GrProcessorSet::~GrProcessorSet() {
for (int i = fFragmentProcessorOffset; i < fFragmentProcessors.count(); ++i) {
if (this->isFinalized()) {