commit | 6e87a54ba62685422153cc06441dda6dcf813f0d | [log] [tgz] |
---|---|---|
author | John Stiles <johnstiles@google.com> | Thu Jun 16 13:51:49 2022 -0400 |
committer | SkCQ <skcq-be@skia-corp.google.com.iam.gserviceaccount.com> | Thu Jun 16 18:32:43 2022 +0000 |
tree | 07d71d16943d3834319187d7e7f0312df010f091 | |
parent | 00bead8e63f354bdb7e57959c0b2ef48cd3f30f3 [diff] |
Add method to calculate size of a DataPayloadField. Using a switch lets the compiler flag an error if we add a DataPayloadType and forget to update this function. Despite initial appearances it's quite efficient when compiled: https://godbolt.org/z/vqoaddGn4 Change-Id: I5f650afdf81205942966fb318643ff4af5a29252 Bug: skia:13428 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550501 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: John Stiles <johnstiles@google.com>