Reland "Revert "SkSL function inlining""
This reverts commit 2dd272bf157de3d3edeff0fbc1a5bcc17eec3164.
Reason for revert: breaking angle
Original change's description:
> Revert "Revert "SkSL function inlining""
>
> This reverts commit 1b63b4ac6933ccddb15bcf650cd5747d5eba44d0.
>
> Change-Id: I8120bb10cecc6889f4f4fd7b4c3a61d250e49219
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291358
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
TBR=bsalomon@google.com,brianosman@google.com,ethannicholas@google.com
# Not skipping CQ checks because this is a reland.
Change-Id: Ib3117efd1b77e97899e636bcbc4d84200118bc36
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292264
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/sksl/SkSLMetalCodeGenerator.cpp b/src/sksl/SkSLMetalCodeGenerator.cpp
index 2b222d8..099ab4c 100644
--- a/src/sksl/SkSLMetalCodeGenerator.cpp
+++ b/src/sksl/SkSLMetalCodeGenerator.cpp
@@ -1164,15 +1164,11 @@
}
void MetalCodeGenerator::writeBlock(const Block& b) {
- if (b.fIsScope) {
- this->writeLine("{");
- fIndentation++;
- }
+ this->writeLine("{");
+ fIndentation++;
this->writeStatements(b.fStatements);
- if (b.fIsScope) {
- fIndentation--;
- this->write("}");
- }
+ fIndentation--;
+ this->write("}");
}
void MetalCodeGenerator::writeIfStatement(const IfStatement& stmt) {