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

Unified Diff: src/effects/gradients/Sk4fLinearGradient.h

Issue 1688543002: Initial linear gradient 4f impl (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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/effects/gradients/Sk4fGradientBase.cpp ('k') | src/effects/gradients/Sk4fLinearGradient.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/Sk4fLinearGradient.h
diff --git a/src/effects/gradients/Sk4fLinearGradient.h b/src/effects/gradients/Sk4fLinearGradient.h
new file mode 100644
index 0000000000000000000000000000000000000000..863376087df61d2ed8372aa273657a54c4919e97
--- /dev/null
+++ b/src/effects/gradients/Sk4fLinearGradient.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2016 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef Sk4fLinearGradient_DEFINED
+#define Sk4fLinearGradient_DEFINED
+
+#include "Sk4fGradientBase.h"
+#include "SkLinearGradient.h"
+
+class SkLinearGradient::
+LinearGradient4fContext : public GradientShaderBase4fContext {
+public:
+ LinearGradient4fContext(const SkLinearGradient&, const ContextRec&);
+
+ void shadeSpan(int x, int y, SkPMColor dst[], int count) override;
+ void shadeSpan4f(int x, int y, SkPM4f dst[], int count) override;
+
+private:
+ using INHERITED = GradientShaderBase4fContext;
+
+ template<typename DstType, TileMode>
+ class LinearIntervalProcessor;
+
+ template <typename DstType, bool premul>
+ void shadePremulSpan(int x, int y, DstType[], int count) const;
+
+ template <typename DstType, bool premul, SkShader::TileMode tileMode>
+ void shadePremulTileSpan(int x, int y, DstType[], int count) const;
+
+ template <typename DstType, bool premul, SkShader::TileMode tileMode>
+ void shadeSpanInternal(int x, int y, DstType[], int count) const;
+};
+
+#endif // Sk4fLinearGradient_DEFINED
« no previous file with comments | « src/effects/gradients/Sk4fGradientBase.cpp ('k') | src/effects/gradients/Sk4fLinearGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698