blob: 25ae37b1c1c41c2cfe2b67600fd74dbcc095bed7 [file] [log] [blame]
wangyixcef14bf2015-07-24 13:48:26 -07001/*
2 * Copyright 2015 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
8#ifndef GrGLBlend_DEFINED
9#define GrGLBlend_DEFINED
10
11#include "SkXfermode.h"
12
egdaniel2d721d32015-11-11 13:06:05 -080013class GrGLSLFragmentBuilder;
wangyixcef14bf2015-07-24 13:48:26 -070014
bsalomonae4738f2015-09-15 15:33:27 -070015namespace GrGLSLBlend {
wangyixcef14bf2015-07-24 13:48:26 -070016 /*
17 * Appends GLSL code to fsBuilder that assigns a specified blend of the srcColor and dstColor
18 * variables to the outColor variable.
19 */
egdaniel2d721d32015-11-11 13:06:05 -080020 void AppendMode(GrGLSLFragmentBuilder* fsBuilder, const char* srcColor,
bsalomonae4738f2015-09-15 15:33:27 -070021 const char* dstColor, const char* outColor, SkXfermode::Mode mode);
wangyixcef14bf2015-07-24 13:48:26 -070022};
23
24#endif