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

Side by Side Diff: include/effects/SkPorterDuff.h

Issue 758133004: Add SK_SUPPORT_LEGACY_PORTER_DUFF macro. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add comment Created 6 years 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 | « gyp/skia_for_android_framework_defines.gypi ('k') | src/effects/SkPorterDuff.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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 SkPorterDuff_DEFINED 8 #ifndef SkPorterDuff_DEFINED
9 #define SkPorterDuff_DEFINED 9 #define SkPorterDuff_DEFINED
10 10
11 #include "SkColor.h" 11 #include "SkColor.h"
12 #include "SkXfermode.h" 12 #include "SkXfermode.h"
13 13
14 //#define SK_SUPPORT_LEGACY_PORTER_DUFF
15
16 // Temporary guard until we can remove the dependencies in android. Then we
17 // plan to remove this entirely.
18 #ifdef SK_SUPPORT_LEGACY_PORTER_DUFF
19
14 class SkXfermode; 20 class SkXfermode;
15 21
16 class SK_API SkPorterDuff { 22 class SK_API SkPorterDuff {
17 public: 23 public:
18 /** List of predefined xfermodes. In general, the algebra for the modes 24 /** List of predefined xfermodes. In general, the algebra for the modes
19 uses the following symbols: 25 uses the following symbols:
20 Sa, Sc - source alpha and color 26 Sa, Sc - source alpha and color
21 Da, Dc - destination alpha and color (before compositing) 27 Da, Dc - destination alpha and color (before compositing)
22 [a, c] - Resulting (alpha, color) values 28 [a, c] - Resulting (alpha, color) values
23 For these equations, the colors are in premultiplied state. 29 For these equations, the colors are in premultiplied state.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 return false and ignore the mode parameter. 76 return false and ignore the mode parameter.
71 */ 77 */
72 static bool IsMode(SkXfermode*, Mode* mode); 78 static bool IsMode(SkXfermode*, Mode* mode);
73 79
74 /** Return the corersponding SkXfermode::Mode 80 /** Return the corersponding SkXfermode::Mode
75 */ 81 */
76 static SkXfermode::Mode ToXfermodeMode(Mode); 82 static SkXfermode::Mode ToXfermodeMode(Mode);
77 } SK_ATTR_DEPRECATED("use SkXfermode::Mode"); 83 } SK_ATTR_DEPRECATED("use SkXfermode::Mode");
78 84
79 #endif 85 #endif
86
87 #endif
OLDNEW
« no previous file with comments | « gyp/skia_for_android_framework_defines.gypi ('k') | src/effects/SkPorterDuff.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698