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

Unified Diff: src/effects/SkArithmeticMode.cpp

Issue 2396953002: Revert[8] "replace SkXfermode obj with SkBlendMode enum in paints" (Closed)
Patch Set: add tmp virtual to unroll legacy arithmodes Created 4 years, 2 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/SkAlphaThresholdFilter.cpp ('k') | src/effects/SkArithmeticModePriv.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 81f29bb9d87cd850e15942057e028bf5e09ca2b8..62595cf1eef38157f0840dfb171d9b6cc414b021 100644
--- a/src/effects/SkArithmeticMode.cpp
+++ b/src/effects/SkArithmeticMode.cpp
@@ -39,6 +39,14 @@ public:
sk_sp<GrXPFactory> asXPFactory() const override;
#endif
+ bool isArithmetic(SkArithmeticParams* params) const override {
+ if (params) {
+ memcpy(params->fK, fK, 4 * sizeof(float));
+ params->fEnforcePMColor = fEnforcePMColor;
+ }
+ return true;
+ }
+
private:
void flatten(SkWriteBuffer& buffer) const override {
buffer.writeScalar(fK[0]);
« no previous file with comments | « src/effects/SkAlphaThresholdFilter.cpp ('k') | src/effects/SkArithmeticModePriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698