723a877d0c
SkFunctionWrapper was made to be a simple abstraction over existing resource release functions which generally follow a specific pattern of returning void and taking a pointer to the underlying type. However, this has been observed to be an unnecessary limit. This makes it more generic while also making the call sites a little less brittle. This change also uncovered an issue in msvc v19.20 to v19.22, see https://developercommunity.visualstudio.com/content/problem/698192/in-templateusing-decltype-is-void.html To work around this, several otherwise redundant '&' are used. There was an attempt to take references to functions instead of pointers to functions which greatly simplifies the intermediate wrappers. However, that uncovered another issue in msvc, see https://developercommunity.visualstudio.com/content/problem/699878/function-to-pointer.html Change-Id: I54ab945ed9d9cfd0204d4d6650c2fde47cc9e175 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235105 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Herb Derby <herb@google.com> |
||
---|---|---|
.. | ||
canvaskit | ||
particles | ||
pathkit | ||
skottie | ||
skparagraph | ||
sksg | ||
skshaper |