aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGeometryProcessor.h
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@google.com>2018-06-19 01:40:57 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-06-19 01:41:10 +0000
commit5045e501d2aec23e5f1e4b46346033ac3202c6b0 (patch)
treeb0179c300d6bc1822b0d945be812fff267bb414a /src/gpu/GrGeometryProcessor.h
parent63b3bfb711d7e3d4f9ad75681d77a69a3c454ab0 (diff)
Revert "Change how vertex/instance attributes are handled in geometry processors."
This reverts commit 19c1233c447f625c2522e7ecd0a0adecc629bb2f. Reason for revert: want to make sure Google3 can roll Original change's description: > Change how vertex/instance attributes are handled in geometry processors. > > * No longer register vertex/instance attributes on base class, just counts > > * Separate instance and vertex attributes and remove InputRate and offset > > * Make attributes constexpr where possible > > Change-Id: I1f1d5e772fa177a96d2aeb805aab7b69f35bfae6 > Reviewed-on: https://skia-review.googlesource.com/132405 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Chris Dalton <csmartdalton@google.com> TBR=egdaniel@google.com,bsalomon@google.com,csmartdalton@google.com Change-Id: I4800632515e14fbf54af52826928ac915657b59f No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/135661 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
Diffstat (limited to 'src/gpu/GrGeometryProcessor.h')
-rw-r--r--src/gpu/GrGeometryProcessor.h37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/gpu/GrGeometryProcessor.h b/src/gpu/GrGeometryProcessor.h
index 5035ad0f53..a12ab0058d 100644
--- a/src/gpu/GrGeometryProcessor.h
+++ b/src/gpu/GrGeometryProcessor.h
@@ -39,44 +39,7 @@ protected:
fSampleShading = sampleShading;
}
- /**
- * Recursive helpers for implementing onVertexAttribute or onInstanceAttribute.
- */
-
- template <typename... Args>
- static const Attribute& IthAttribute(int i, const Attribute& attr0, const Args&... attrs) {
- SkASSERT(attr0.isInitialized());
- return (0 == i) ? attr0 : IthAttribute(i - 1, attrs...);
- }
-
- static const Attribute& IthAttribute(int i) {
- SK_ABORT("Illegal attribute Index");
- static constexpr Attribute kBogus;
- return kBogus;
- }
-
- template <typename... Args>
- static const Attribute& IthInitializedAttribute(int i, const Attribute& attr0,
- const Args&... attrs) {
- if (attr0.isInitialized()) {
- if (0 == i) {
- return attr0;
- }
- i -= 1;
- }
- return IthInitializedAttribute(i, attrs...);
- }
-
- static const Attribute& IthInitializedAttribute(int i) { return IthAttribute(i); }
-
private:
- // Since most subclasses don't use instancing provide a default implementation for that case.
- const Attribute& onInstanceAttribute(int i) const override {
- SK_ABORT("No instanced attributes");
- static constexpr Attribute kBogus;
- return kBogus;
- }
-
bool fWillUseGeoShader;
float fSampleShading;