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

Unified Diff: src/gpu/effects/GrCustomXfermodePriv.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 | « src/gpu/effects/GrCustomXfermode.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrCustomXfermodePriv.h
diff --git a/src/gpu/effects/GrCustomXfermodePriv.h b/src/gpu/effects/GrCustomXfermodePriv.h
new file mode 100644
index 0000000000000000000000000000000000000000..0c8035111e0c6fb97c665d843b060c10b162eefa
--- /dev/null
+++ b/src/gpu/effects/GrCustomXfermodePriv.h
@@ -0,0 +1,54 @@
+/*
+ * 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 GrCustomXfermodePriv_DEFINED
+#define GrCustomXfermodePriv_DEFINED
+
+#include "GrCoordTransform.h"
+#include "GrFragmentProcessor.h"
+#include "GrTextureAccess.h"
+#include "SkXfermode.h"
+
+class GrGLCaps;
+class GrGLFragmentProcessor;
+class GrInvariantOutput;
+class GrProcessorKeyBuilder;
+class GrTexture;
+
+///////////////////////////////////////////////////////////////////////////////
+// Fragment Processor
+///////////////////////////////////////////////////////////////////////////////
+
+class GrCustomXferFP : public GrFragmentProcessor {
+public:
+ GrCustomXferFP(SkXfermode::Mode mode, GrTexture* background);
+
+ void getGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const SK_OVERRIDE;
+
+ GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE;
+
+ const char* name() const SK_OVERRIDE { return "Custom Xfermode"; }
+
+ SkXfermode::Mode mode() const { return fMode; }
+ const GrTextureAccess& backgroundAccess() const { return fBackgroundAccess; }
+
+private:
+ bool onIsEqual(const GrFragmentProcessor& other) const SK_OVERRIDE;
+
+ void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVERRIDE;
+
+ GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
+
+ SkXfermode::Mode fMode;
+ GrCoordTransform fBackgroundTransform;
+ GrTextureAccess fBackgroundAccess;
+
+ typedef GrFragmentProcessor INHERITED;
+};
+
+#endif
+
« no previous file with comments | « src/gpu/effects/GrCustomXfermode.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698