skia2/modules/skshaper
Ben Wagner 723a877d0c Make SkFunctionWrapper a better wrapper.
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>
2019-08-20 20:31:36 +00:00
..
include [skottie,skshaper] Plumb an optional SkFontMgr in SkShaper/SkottieShaper 2019-07-26 19:34:48 +00:00
src Make SkFunctionWrapper a better wrapper. 2019-08-20 20:31:36 +00:00
BUILD.gn rewrite *.gn and #includes on CheckGeneratedFiles bot 2019-07-25 20:48:33 +00:00
skshaper.gni Make SkShaper an interface. 2019-02-19 22:06:47 +00:00