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

Unified Diff: src/gpu/effects/GrDefaultXferProcessor.h

Issue 751283002: Add XferProcessor factory in GrPaint and GrDrawState. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update gyp Created 6 years, 1 month 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
Index: src/gpu/effects/GrDefaultXferProcessor.h
diff --git a/src/gpu/effects/GrDefaultXferProcessor.h b/src/gpu/effects/GrDefaultXferProcessor.h
new file mode 100644
index 0000000000000000000000000000000000000000..fe3f20982f185f7e5e3a20650d0a5feec06127c5
--- /dev/null
+++ b/src/gpu/effects/GrDefaultXferProcessor.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2014 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef GrDefaultXferProcessor_DEFINED
+#define GrDefaultXferProcessor_DEFINED
+
+#include "GrPorterDuffXferProcessor.h"
+
+class GrDefaultXPFactory : public GrPorterDuffXPFactory {
+public:
+ static const GrXPFactory* Create() {
+ GR_CREATE_STATIC_XP_FACTORY(gDefaultXPFactory, GrDefaultXPFactory, ());
+ return SkRef(gDefaultXPFactory);
+ }
+
+private:
+ GrDefaultXPFactory() : INHERITED(SkXfermode::kOne_Coeff, SkXfermode::kZero_Coeff) {}
+
+ typedef GrPorterDuffXPFactory INHERITED;
+};
+
+#endif
+

Powered by Google App Engine
This is Rietveld 408576698