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: src/gpu/gl/GrGLXferProcessor.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/gl/GrGLXferProcessor.h
diff --git a/src/gpu/gl/GrGLXferProcessor.h b/src/gpu/gl/GrGLXferProcessor.h
new file mode 100644
index 0000000000000000000000000000000000000000..566dcde795c423ec3e682e64fa1824c67284cff8
--- /dev/null
+++ b/src/gpu/gl/GrGLXferProcessor.h
@@ -0,0 +1,42 @@
+/*
+ * 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 GrGLXferProcessor_DEFINED
+#define GrGLXferProcessor_DEFINED
+
+#if 0 // Can undo this once I have a backend. Remove GrGLXferProcessor from gl/GrGLProcessor.h"
+#include "GrGLProcessor.h"
+
+class GrGLFPBuilder;
+
+/**
bsalomon 2014/11/26 21:02:45 All the comments in this file seem to be related t
egdaniel 2014/12/01 18:18:25 This file is actually not even needed till the fin
+ * If a GL effect needs a GrGLFullShaderBuilder* object to emit vertex code, then it must inherit
+ * from this class. Since paths don't have vertices, this class is only meant to be used internally
+ * by skia, for special cases.
+ */
+class GrGLXferProcessor : public GrGLProcessor {
+public:
+ GrGLXferProcessor(const GrBackendProcessorFactory& factory)
+ : INHERITED(factory) {}
+
+ /**
+ * This is similar to emitCode() in the base class, except it takes a full shader builder.
+ * This allows the effect subclass to emit vertex code.
+ */
+ virtual void emitCode(GrGLFPBuilder* builder,
+ const GrXferProcessor& xferProcessor,
+ const GrProcessorKey& key,
+ const char* outputColor,
+ const char* inputColor,
+ const TransformedCoordsArray& coords,
+ const TextureSamplerArray& samplers) = 0;
+
+private:
+ typedef GrGLProcessor INHERITED;
+};
+#endif
+#endif
« src/gpu/effects/GrPorterDuffXferProcessor.cpp ('K') | « src/gpu/gl/GrGLProcessor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698