skia2/modules/skparagraph
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 Placeholders implementation + unit tests 2019-08-20 18:24:40 +00:00
src Make SkFunctionWrapper a better wrapper. 2019-08-20 20:31:36 +00:00
utils re-run tools/rewrite_includes.py 2019-07-25 15:40:33 +00:00
BUILD.gn rewrite *.gn and #includes on CheckGeneratedFiles bot 2019-07-25 20:48:33 +00:00
skparagraph.gni Paragraph cache: caching the shaped results only. 2019-08-09 16:51:41 +00:00