aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private
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 /include/private
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 'include/private')
-rw-r--r--include/private/GrTypesPriv.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/include/private/GrTypesPriv.h b/include/private/GrTypesPriv.h
index efb9992f3d..5913a1e48c 100644
--- a/include/private/GrTypesPriv.h
+++ b/include/private/GrTypesPriv.h
@@ -696,7 +696,7 @@ static const int kGrVertexAttribTypeCount = kLast_GrVertexAttribType + 1;
/**
* Returns the size of the attrib type in bytes.
*/
-static constexpr inline size_t GrVertexAttribTypeSize(GrVertexAttribType type) {
+static inline size_t GrVertexAttribTypeSize(GrVertexAttribType type) {
switch (type) {
case kFloat_GrVertexAttribType:
return sizeof(float);
@@ -734,11 +734,7 @@ static constexpr inline size_t GrVertexAttribTypeSize(GrVertexAttribType type) {
case kUint_GrVertexAttribType:
return sizeof(uint32_t);
}
- // GCC fails because SK_ABORT evaluates to non constexpr. clang and cl.exe think this is
- // unreachable and don't complain.
-#if defined(__clang__) || !defined(__GNUC__)
- SK_ABORT("Unsupported type conversion");
-#endif
+ SK_ABORT("Unexpected attribute type");
return 0;
}