skia2/modules
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
..
canvaskit remove SkPicture_none.cpp 2019-08-16 14:52:25 +00:00
particles Revert "Revert "unified Vulkan uniform buffers"" 2019-08-15 19:14:03 +00:00
pathkit rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
skottie [skottie] Shaper downscale-to-fit vertical alignment mode 2019-08-19 18:59:06 +00:00
skparagraph Make SkFunctionWrapper a better wrapper. 2019-08-20 20:31:36 +00:00
sksg Update skottie/sksg to use new filter factories 2019-08-02 14:51:42 +00:00
skshaper Make SkFunctionWrapper a better wrapper. 2019-08-20 20:31:36 +00:00