aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ccpr/GrCCCoverageProcessor.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-06-19 14:33:47 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-06-19 20:01:29 +0000
commit92be2f74db81f0ed480b55c58cbde39270f9b772 (patch)
treed2b7135f511a318f10c5c86f2537c07051c922bd /src/gpu/ccpr/GrCCCoverageProcessor.h
parentf5ac906476cd26f2967a48340940e6af580fa71f (diff)
Revert "Revert "Change how vertex/instance attributes are handled in geometry processors.""
This reverts commit 5045e501d2aec23e5f1e4b46346033ac3202c6b0. TBR=csmartdalton@google.com Change-Id: Ifbf5f1d8f8ef340fdc69653e931b6d68d4bf0854 Reviewed-on: https://skia-review.googlesource.com/135862 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/ccpr/GrCCCoverageProcessor.h')
-rw-r--r--src/gpu/ccpr/GrCCCoverageProcessor.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gpu/ccpr/GrCCCoverageProcessor.h b/src/gpu/ccpr/GrCCCoverageProcessor.h
index e3ea34f8dd..89890486d3 100644
--- a/src/gpu/ccpr/GrCCCoverageProcessor.h
+++ b/src/gpu/ccpr/GrCCCoverageProcessor.h
@@ -246,6 +246,13 @@ private:
void initGS();
void initVS(GrResourceProvider*);
+ const Attribute& onVertexAttribute(int i) const override { return fVertexAttribute; }
+
+ const Attribute& onInstanceAttribute(int i) const override {
+ SkASSERT(fImpl == Impl::kVertexShader);
+ return fInstanceAttributes[i];
+ }
+
void appendGSMesh(GrBuffer* instanceBuffer, int instanceCount, int baseInstance,
SkTArray<GrMesh>* out) const;
void appendVSMesh(GrBuffer* instanceBuffer, int instanceCount, int baseInstance,
@@ -253,6 +260,8 @@ private:
GrGLSLPrimitiveProcessor* createGSImpl(std::unique_ptr<Shader>) const;
GrGLSLPrimitiveProcessor* createVSImpl(std::unique_ptr<Shader>) const;
+ // The type and meaning of this attribute depends on whether we're using VSImpl or GSImpl.
+ Attribute fVertexAttribute;
const PrimitiveType fPrimitiveType;
const Impl fImpl;
@@ -262,6 +271,7 @@ private:
const GSSubpass fGSSubpass = GSSubpass::kHulls;
// Used by VSImpl.
+ Attribute fInstanceAttributes[2];
sk_sp<const GrBuffer> fVSVertexBuffer;
sk_sp<const GrBuffer> fVSIndexBuffer;
int fVSNumIndicesPerInstance;