blob: 65fd255d1bb8e70a56b7578a4e9feb0bcb8a4cb0 [file] [log] [blame]
Ethan Nicholas130fb3f2018-02-01 12:14:34 -05001/*
2 * Copyright 2018 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
Ethan Nicholasbe0a0422017-11-17 13:44:05 -05008@optimizationFlags {
9 kPreservesOpaqueInput_OptimizationFlag | kConstantOutputForConstantInput_OptimizationFlag
10}
11
12void main() {
13 sk_OutColor = sk_InColor;
14 sk_OutColor.rgb *= sk_InColor.a;
15}
16
17@class {
18 GrColor4f constantOutputForConstantInput(GrColor4f input) const override {
19 return input.premul();
20 }
21}