Revert "Store float value for SkSL settings"
This reverts commit 5f689779d27e7fa914d71fbac74aaf78529ba036.
Reason for revert: Breaking housekeeper bot because it no longer compiles in standalone mode (skia_compile_processors = true in gn args)
Original change's description:
> Store float value for SkSL settings
>
> If you used 'in float foo' in a runtime effect it would always have the
> value cast to an int. I don't think we saw this in .fp files because
> the cpp generation handled those values directly (if I remember correctly)
>
> Change-Id: I336469eaad9c98fc9290f9a93dc6f0221ab5545a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292261
> Commit-Queue: Brian Osman <brianosman@google.com>
> Auto-Submit: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=brianosman@google.com,ethannicholas@google.com,michaelludwig@google.com
Change-Id: I1989765ecfd6a3d8ec674df4864c395cd8c70692
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292312
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/sksl/ir/SkSLProgram.h b/src/sksl/ir/SkSLProgram.h
index fa0fb55..c7694b5 100644
--- a/src/sksl/ir/SkSLProgram.h
+++ b/src/sksl/ir/SkSLProgram.h
@@ -53,7 +53,7 @@
Value(float f)
: fKind(kFloat_Kind)
- , fValue(SkFloat2Bits(f)) {}
+ , fValue(f) {}
std::unique_ptr<Expression> literal(const Context& context, int offset) const {
switch (fKind) {
@@ -67,8 +67,8 @@
fValue));
case Program::Settings::Value::kFloat_Kind:
return std::unique_ptr<Expression>(new FloatLiteral(context,
- offset,
- SkBits2Float(fValue)));
+ offset,
+ fValue));
default:
SkASSERT(false);
return nullptr;