Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Unified Diff: src/gpu/gl/GrGLBlend.h

Issue 1254833003: Added GrGLBlend.h|cpp with helper function AppendPorterDuffBlend() in preparation for SkComposeShad… (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: More nits by Greg Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/effects/GrPorterDuffXferProcessor.cpp ('k') | src/gpu/gl/GrGLBlend.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLBlend.h
diff --git a/src/gpu/gl/GrGLBlend.h b/src/gpu/gl/GrGLBlend.h
new file mode 100644
index 0000000000000000000000000000000000000000..af447b47bf29704276e07b88779d70cecf944b5f
--- /dev/null
+++ b/src/gpu/gl/GrGLBlend.h
@@ -0,0 +1,24 @@
+/*
+ * 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 "SkXfermode.h"
+
+class GrGLFragmentBuilder;
+
+namespace GrGLBlend {
+ /*
+ * Appends GLSL code to fsBuilder that assigns a specified blend of the srcColor and dstColor
+ * variables to the outColor variable.
+ */
+ void AppendPorterDuffBlend(GrGLFragmentBuilder* fsBuilder, const char* srcColor,
+ const char* dstColor, const char* outColor, SkXfermode::Mode mode);
+};
+
+#endif
« no previous file with comments | « src/gpu/effects/GrPorterDuffXferProcessor.cpp ('k') | src/gpu/gl/GrGLBlend.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698