442a5d9365
Caveat: on my machine, Nanobench doesn't detect any change (pro or con) on this CL. I'm working under the assumption that function calls have a non-zero cost--they may be inlined (bloating code size), or not (incurring the costs of a function call, register push/popping, etc). This CL avoids making six calls to $blend_set_color_saturation by using two half3 variables. These half3s are used to swizzle the result--they contain two zeros and a one, so multiplying them by a scalar will put the result in the desired component. I've also made some very minor simplifications to the math that were made possible by reordering. Change-Id: I0c1ef88d165365376078846324be8bb723548512 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528043 Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com> |
||
---|---|---|
.. | ||
DoWhileBodyMustBeInlinedIntoAScope.glsl | ||
DoWhileTestCannotBeInlined.glsl | ||
ExponentialGrowth.glsl | ||
ExponentialGrowthStandaloneSettings.glsl | ||
ForBodyMustBeInlinedIntoAScope.glsl | ||
ForInitializerExpressionsCanBeInlined.glsl | ||
ForWithoutReturnInsideCanBeInlined.glsl | ||
ForWithReturnInsideCannotBeInlined.glsl | ||
IfBodyMustBeInlinedIntoAScope.glsl | ||
IfElseBodyMustBeInlinedIntoAScope.glsl | ||
IfElseChainWithReturnsCanBeInlined.glsl | ||
IfTestCanBeInlined.glsl | ||
IfWithReturnsCanBeInlined.glsl | ||
InlineKeywordOverridesThreshold.glsl | ||
InlinerAvoidsVariableNameOverlap.glsl | ||
InlinerCanBeDisabled.glsl | ||
InlinerCanBeDisabledStandaloneSettings.glsl | ||
InlinerElidesTempVarForReturnsInsideBlock.glsl | ||
InlinerManglesNames.glsl | ||
InlinerUsesTempVarForMultipleReturns.glsl | ||
InlinerUsesTempVarForReturnsInsideBlockWithVar.glsl | ||
InlineThreshold.glsl | ||
InlineWithModifiedArgument.glsl | ||
InlineWithNestedBigCalls.glsl | ||
InlineWithNestedCalls.glsl | ||
InlineWithUnmodifiedArgument.glsl | ||
InlineWithUnnecessaryBlocks.glsl | ||
NoInline.glsl | ||
Ossfuzz37994.glsl | ||
ShortCircuitEvaluationsCannotInlineRightHandSide.glsl | ||
StaticSwitch.glsl | ||
StructsCanBeInlinedSafely.glsl | ||
SwitchWithCastCanBeInlined.glsl | ||
SwitchWithoutReturnInsideCanBeInlined.glsl | ||
SwizzleCanBeInlinedDirectly.glsl | ||
TernaryResultsCannotBeInlined.glsl | ||
TernaryTestCanBeInlined.glsl | ||
TrivialArgumentsInlineDirectly.glsl | ||
WhileBodyMustBeInlinedIntoAScope.glsl | ||
WhileTestCannotBeInlined.glsl |