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

Side by Side Diff: include/core/SkBlendMode.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 | « gyp/skia_for_android_framework_defines.gypi ('k') | include/core/SkCanvas.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2016 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef SkBlendMode_DEFINED
9 #define SkBlendMode_DEFINED
10
11 enum class SkBlendMode {
12 kClear, //!< [0, 0]
13 kSrc, //!< [Sa, Sc]
14 kDst, //!< [Da, Dc]
15 kSrcOver, //!< [Sa + Da * (1 - Sa), Sc + Dc * (1 - Sa)]
16 kDstOver, //!< [Da + Sa * (1 - Da), Dc + Sc * (1 - Da)]
17 kSrcIn, //!< [Sa * Da, Sc * Da]
18 kDstIn, //!< [Da * Sa, Dc * Sa]
19 kSrcOut, //!< [Sa * (1 - Da), Sc * (1 - Da)]
20 kDstOut, //!< [Da * (1 - Sa), Dc * (1 - Sa)]
21 kSrcATop, //!< [Da, Sc * Da + Dc * (1 - Sa)]
22 kDstATop, //!< [Sa, Dc * Sa + Sc * (1 - Da)]
23 kXor, //!< [Sa + Da - 2 * Sa * Da, Sc * (1 - Da) + Dc * (1 - Sa)]
24 kPlus, //!< [Sa + Da, Sc + Dc]
25 kModulate, // multiplies all components (= alpha and color)
26
27 // Following blend modes are defined in the CSS Compositing standard:
28 // https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#blending
29 kScreen,
30 kLastCoeffMode = kScreen,
31
32 kOverlay,
33 kDarken,
34 kLighten,
35 kColorDodge,
36 kColorBurn,
37 kHardLight,
38 kSoftLight,
39 kDifference,
40 kExclusion,
41 kMultiply,
42 kLastSeparableMode = kMultiply,
43
44 kHue,
45 kSaturation,
46 kColor,
47 kLuminosity,
48 kLastMode = kLuminosity
49 };
50
51 #endif
OLDNEW
« no previous file with comments | « gyp/skia_for_android_framework_defines.gypi ('k') | include/core/SkCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698