blob: 51847491372ddc48c6cc10e28e4cc593d744d7a9 [file] [log] [blame]
/*
* Copyright 2018 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@optimizationFlags {
kPreservesOpaqueInput_OptimizationFlag | kConstantOutputForConstantInput_OptimizationFlag
}
void main() {
sk_OutColor = sk_InColor;
sk_OutColor.rgb *= sk_InColor.a;
}
@class {
SkPMColor4f constantOutputForConstantInput(const SkPMColor4f& input) const override {
return SkColor4f { input.fR, input.fG, input.fB, input.fA }.premul();
}
}