Add comment explaining memset in ArithmeticFPInputs
Change-Id: I1541e3f4629a117eee3f244c0209e442b705b67b Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268844 Auto-Submit: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
This commit is contained in:
parent
637c0b527c
commit
194dfdea3a
@ -12,6 +12,9 @@
|
||||
|
||||
struct ArithmeticFPInputs {
|
||||
ArithmeticFPInputs(float k0, float k1, float k2, float k3, bool enforcePMColor) {
|
||||
// We copy instances of this struct as the input data blob for the SkSL FP. The FP
|
||||
// may try to access all of our bytes (for comparison purposes), so be sure to zero out
|
||||
// any padding after the dangling bool.
|
||||
memset(this, 0, sizeof(*this));
|
||||
fK[0] = k0;
|
||||
fK[1] = k1;
|
||||
|
Loading…
Reference in New Issue
Block a user