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

Unified Diff: src/effects/SkArithmeticMode.cpp

Issue 837633005: Add Arithmetic mode xp. (Closed) Base URL: https://skia.googlesource.com/skia.git@arithGpuFile
Patch Set: Fix compile 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 | « no previous file | src/effects/SkArithmeticMode_gpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkArithmeticMode.cpp
diff --git a/src/effects/SkArithmeticMode.cpp b/src/effects/SkArithmeticMode.cpp
index d86f73bee45b1510737ecd08614c7c2daeed50f6..ae18c2770e75e39e719a5aa7a78b2a38f990368f 100644
--- a/src/effects/SkArithmeticMode.cpp
+++ b/src/effects/SkArithmeticMode.cpp
@@ -31,8 +31,9 @@ public:
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkArithmeticMode_scalar)
#if SK_SUPPORT_GPU
- virtual bool asFragmentProcessor(GrFragmentProcessor**,
- GrTexture* background) const SK_OVERRIDE;
+ bool asFragmentProcessor(GrFragmentProcessor**, GrTexture* background) const SK_OVERRIDE;
+
+ bool asXPFactory(GrXPFactory**) const SK_OVERRIDE;
#endif
private:
@@ -246,6 +247,17 @@ bool SkArithmeticMode_scalar::asFragmentProcessor(GrFragmentProcessor** fp,
return true;
}
+bool SkArithmeticMode_scalar::asXPFactory(GrXPFactory** xpf) const {
+ if (xpf) {
+ *xpf = GrArithmeticXPFactory::Create(SkScalarToFloat(fK[0]),
+ SkScalarToFloat(fK[1]),
+ SkScalarToFloat(fK[2]),
+ SkScalarToFloat(fK[3]),
+ fEnforcePMColor);
+ }
+ return true;
+}
+
#endif
SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkArithmeticMode)
« no previous file with comments | « no previous file | src/effects/SkArithmeticMode_gpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698