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

Side by Side Diff: src/effects/SkArithmeticModePriv.h

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 unified diff | Download patch
« no previous file with comments | « src/effects/SkArithmeticMode.cpp ('k') | src/effects/SkColorFilterImageFilter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkArithmeticModePriv_DEFINED 8 #ifndef SkArithmeticModePriv_DEFINED
9 #define SkArithmeticModePriv_DEFINED 9 #define SkArithmeticModePriv_DEFINED
10 10
11 #include "SkArithmeticMode.h" 11 #include "SkArithmeticMode.h"
12 12
13 struct SkArithmeticParams {
14 float fK[4];
15 bool fEnforcePMColor;
16 };
17
13 #ifndef SK_SUPPORT_LEGACY_ARITHMETICMODE 18 #ifndef SK_SUPPORT_LEGACY_ARITHMETICMODE
14 19
15 class SK_API SkArithmeticMode { 20 class SK_API SkArithmeticMode {
16 public: 21 public:
17 /** 22 /**
18 * result = clamp[k1 * src * dst + k2 * src + k3 * dst + k4] 23 * result = clamp[k1 * src * dst + k2 * src + k3 * dst + k4]
19 * 24 *
20 * k1=k2=k3=0, k4=1.0 results in returning opaque white 25 * k1=k2=k3=0, k4=1.0 results in returning opaque white
21 * k1=k3=k4=0, k2=1.0 results in returning the src 26 * k1=k3=k4=0, k2=1.0 results in returning the src
22 * k1=k2=k4=0, k3=1.0 results in returning the dst 27 * k1=k2=k4=0, k3=1.0 results in returning the dst
(...skipping 10 matching lines...) Expand all
33 38
34 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP(); 39 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP();
35 40
36 private: 41 private:
37 SkArithmeticMode(); // can't be instantiated 42 SkArithmeticMode(); // can't be instantiated
38 }; 43 };
39 44
40 #endif 45 #endif
41 46
42 #endif 47 #endif
OLDNEW
« no previous file with comments | « src/effects/SkArithmeticMode.cpp ('k') | src/effects/SkColorFilterImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698