diff options
author | Brian Salomon <bsalomon@google.com> | 2017-04-10 10:54:25 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-10 15:38:47 +0000 |
commit | d61c9d93b126dca0af17eff89be8536944dadf81 (patch) | |
tree | 975f3418b8f1f303a2530a2a4b67a97c82c86dcc /src/gpu/GrProcessorSet.cpp | |
parent | f9aa9e51691d83970039f42c623c1fd354552378 (diff) |
Move ref counting out of GrProcessor and into subclasses.
This will allow different subclasses to use different models for lifetime management.
GrXferProcessor moves to simple ref counting since they don't own GrGpuResources.
This also constifies GrXferProcessor factories.
Change-Id: I6bea0ea8de718874063224232f9da50887868b16
Reviewed-on: https://skia-review.googlesource.com/11792
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/GrProcessorSet.cpp')
-rw-r--r-- | src/gpu/GrProcessorSet.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gpu/GrProcessorSet.cpp b/src/gpu/GrProcessorSet.cpp index 93617649a3..a76a10b8f9 100644 --- a/src/gpu/GrProcessorSet.cpp +++ b/src/gpu/GrProcessorSet.cpp @@ -47,7 +47,7 @@ GrProcessorSet::~GrProcessorSet() { } } if (this->isFinalized() && this->xferProcessor()) { - this->xferProcessor()->completedExecution(); + this->xferProcessor()->unref(); } } @@ -168,12 +168,9 @@ GrProcessorSet::Analysis GrProcessorSet::finalize(const GrProcessorAnalysisColor auto xp = GrXPFactory::MakeXferProcessor(this->xpFactory(), colorAnalysis.outputColor(), outputCoverage, isMixedSamples, caps); - fXP.fProcessor = xp.get(); - if (fXP.fProcessor) { - fXP.fProcessor->addPendingExecution(); - } - fFlags |= kFinalized_Flag; + fXP.fProcessor = xp.release(); + fFlags |= kFinalized_Flag; analysis.fIsInitialized = true; return analysis; } |