aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPipeline.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-04-10 10:54:25 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-10 15:38:47 +0000
commitd61c9d93b126dca0af17eff89be8536944dadf81 (patch)
tree975f3418b8f1f303a2530a2a4b67a97c82c86dcc /src/gpu/GrPipeline.h
parentf9aa9e51691d83970039f42c623c1fd354552378 (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/GrPipeline.h')
-rw-r--r--src/gpu/GrPipeline.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gpu/GrPipeline.h b/src/gpu/GrPipeline.h
index a2a332fc36..b08b4baa1f 100644
--- a/src/gpu/GrPipeline.h
+++ b/src/gpu/GrPipeline.h
@@ -131,7 +131,7 @@ public:
int numFragmentProcessors() const { return fFragmentProcessors.count(); }
const GrXferProcessor& getXferProcessor() const {
- if (fXferProcessor.get()) {
+ if (fXferProcessor) {
return *fXferProcessor.get();
} else {
// A null xp member means the common src-over case. GrXferProcessor's ref'ing
@@ -228,7 +228,6 @@ private:
using DstTexture = GrPendingIOResource<GrTexture, kRead_GrIOType>;
using PendingFragmentProcessor = GrPendingProgramElement<const GrFragmentProcessor>;
using FragmentProcessorArray = SkAutoSTArray<8, PendingFragmentProcessor>;
- using ProgramXferProcessor = GrPendingProgramElement<const GrXferProcessor>;
DstTexture fDstTexture;
SkIPoint fDstTextureOffset;
@@ -238,7 +237,7 @@ private:
const GrUserStencilSettings* fUserStencilSettings;
uint16_t fDrawFace;
uint16_t fFlags;
- ProgramXferProcessor fXferProcessor;
+ sk_sp<const GrXferProcessor> fXferProcessor;
FragmentProcessorArray fFragmentProcessors;
// This value is also the index in fFragmentProcessors where coverage processors begin.