1 /* 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 "SkRegion.h" 12 #include "SkXfermode.h" 13 14 class GrGLSLFragmentBuilder; 15 16 namespace GrGLSLBlend { 17 /* 18 * Appends GLSL code to fsBuilder that assigns a specified blend of the srcColor and dstColor 19 * variables to the outColor variable. 20 */ 21 void AppendMode(GrGLSLFragmentBuilder* fsBuilder, const char* srcColor, 22 const char* dstColor, const char* outColor, SkXfermode::Mode mode); 23 24 void AppendRegionOp(GrGLSLFragmentBuilder* fsBuilder, const char* srcColor, 25 const char* dstColor, const char* outColor, SkRegion::Op regionOp); 26 }; 27 28 #endif 29