Revert "Create ContextUtils for packing and unpacking RP contexts."
This reverts commit 11d3660d9c987e873ba252e7c33154cc46410abd.
Reason for revert: ASAN
Original change's description:
> Create ContextUtils for packing and unpacking RP contexts.
>
> Some upcoming changes to SkRP will allow us to generate many more
> ops with only 8-byte contexts (by replacing pointers with relative
> offsets into program data). In a 64-bit build, these 8-byte contexts
> are small enough to fit directly in the context pointer of a raster
> pipeline stage. (In a 32-bit build, we will need to continue using
> allocs, but this only applies to a dwindling population of very old
> devices which are unlikely to be keeping current on patches anyway.)
>
> SkRPCtxUtils::Pack will check if the passed-in struct is small enough
> to fit directly in the context field. If so, it will return the data
> bit-casted into a void pointer. If not, it allocates a copy of the
> struct inside the alloc and then returns a pointer to the copy.
>
> SkRPCtxUtils::Unpack performs the reverse operation: either
> un-bitcasting the object back to its original form, or returning the
> pointer as-is, depending on the size of the type.
>
> In followup CLs, we will be able to remove allocs for many common
> operations on 64-bit clients, by converting pointers into 32-bit
> offsets, and using Pack and Unpack when accessing the context.
> This should save memory, and makes execution more efficient on
> 64-bit clients by getting rid of a memory access.
>
> Change-Id: I8fae6ba8142aa5eec1ae446b3c3f0f16d8e2bb42
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/668697
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Change-Id: Ibaf80d7913eca2fc12e12b04e4322753cfecfc2d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/670037
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
5 files changed