summaryrefslogtreecommitdiffstats
path: root/gfx/skia/skia/src/gpu/glsl/GrGLSLBlend.h
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/skia/skia/src/gpu/glsl/GrGLSLBlend.h')
-rw-r--r--gfx/skia/skia/src/gpu/glsl/GrGLSLBlend.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/gfx/skia/skia/src/gpu/glsl/GrGLSLBlend.h b/gfx/skia/skia/src/gpu/glsl/GrGLSLBlend.h
new file mode 100644
index 000000000..c8047f8af
--- /dev/null
+++ b/gfx/skia/skia/src/gpu/glsl/GrGLSLBlend.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2015 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef GrGLBlend_DEFINED
+#define GrGLBlend_DEFINED
+
+#include "SkRegion.h"
+#include "SkXfermode.h"
+
+class GrGLSLFragmentBuilder;
+
+namespace GrGLSLBlend {
+ /*
+ * Appends GLSL code to fsBuilder that assigns a specified blend of the srcColor and dstColor
+ * variables to the outColor variable.
+ */
+ void AppendMode(GrGLSLFragmentBuilder* fsBuilder, const char* srcColor,
+ const char* dstColor, const char* outColor, SkXfermode::Mode mode);
+
+ void AppendRegionOp(GrGLSLFragmentBuilder* fsBuilder, const char* srcColor,
+ const char* dstColor, const char* outColor, SkRegion::Op regionOp);
+};
+
+#endif