aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPrimitiveProcessor.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/GrPrimitiveProcessor.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/GrPrimitiveProcessor.h')
-rw-r--r--src/gpu/GrPrimitiveProcessor.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gpu/GrPrimitiveProcessor.h b/src/gpu/GrPrimitiveProcessor.h
index 76fa6c591e..d078ac5072 100644
--- a/src/gpu/GrPrimitiveProcessor.h
+++ b/src/gpu/GrPrimitiveProcessor.h
@@ -38,7 +38,7 @@ class GrGLSLPrimitiveProcessor;
* GrPrimitiveProcessors must proivide seed color and coverage for the Ganesh color / coverage
* pipelines, and they must provide some notion of equality
*/
-class GrPrimitiveProcessor : public GrResourceIOProcessor {
+class GrPrimitiveProcessor : public GrResourceIOProcessor, public GrProgramElement {
public:
// Only the GrGeometryProcessor subclass actually has a geo shader or vertex attributes, but
// we put these calls on the base class to prevent having to cast
@@ -114,6 +114,9 @@ protected:
size_t fVertexStride;
private:
+ void addPendingIOs() const override { GrResourceIOProcessor::addPendingIOs(); }
+ void removeRefs() const override { GrResourceIOProcessor::removeRefs(); }
+ void pendingIOComplete() const override { GrResourceIOProcessor::pendingIOComplete(); }
void notifyRefCntIsZero() const final {}
virtual bool hasExplicitLocalCoords() const = 0;