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

Unified Diff: include/gpu/effects/GrCustomXfermode.h

Issue 844913003: Move XferEffects class to GrCustomXfermode file (Closed) Base URL: https://skia.googlesource.com/skia.git@arithXP
Patch Set: Fix build Created 5 years, 11 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 | « gyp/gpu.gypi ('k') | src/core/SkXfermode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/effects/GrCustomXfermode.h
diff --git a/include/gpu/effects/GrCustomXfermode.h b/include/gpu/effects/GrCustomXfermode.h
new file mode 100644
index 0000000000000000000000000000000000000000..e35727e96ede91bf87b4a13015be586ca288fea6
--- /dev/null
+++ b/include/gpu/effects/GrCustomXfermode.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 GrCustomXfermode_DEFINED
+#define GrCustomXfermode_DEFINED
+
+#include "SkXfermode.h"
+
+class GrFragmentProcessor;
+class GrTexture;
+
+/**
+ * Custom Xfer modes are used for blending when the blend mode cannot be represented using blend
+ * coefficients. It is assumed that all blending is done within the processors' emit code. For each
+ * blend mode there should be a matching fragment processor (used when blending with a background
+ * texture) and xfer processor.
+ */
+namespace GrCustomXfermode {
+ bool IsSupportedMode(SkXfermode::Mode mode);
+
+ GrFragmentProcessor* CreateFP(SkXfermode::Mode mode, GrTexture* background);
+};
+
+#endif
« no previous file with comments | « gyp/gpu.gypi ('k') | src/core/SkXfermode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698