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

Side by Side Diff: src/effects/SkPorterDuff.cpp

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 | « include/effects/SkPorterDuff.h ('k') | no next file » | 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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkPorterDuff.h" 10 #include "SkPorterDuff.h"
11 #include "SkXfermode.h" 11 #include "SkXfermode.h"
12 12
13 #ifdef SK_SUPPORT_LEGACY_PORTER_DUFF
14
13 /* This file just exists as a compatibility layer, gluing the PorterDuff API 15 /* This file just exists as a compatibility layer, gluing the PorterDuff API
14 into the (extended) SkXfermode API 16 into the (extended) SkXfermode API
15 */ 17 */
16 18
17 #define MAKE_PAIR(mode) { SkPorterDuff::k##mode##_Mode, SkXfermode::k##mode##_Mo de } 19 #define MAKE_PAIR(mode) { SkPorterDuff::k##mode##_Mode, SkXfermode::k##mode##_Mo de }
18 20
19 // this table must be in SkPorterDuff::Mode order, so it can be indexed directly 21 // this table must be in SkPorterDuff::Mode order, so it can be indexed directly
20 // with a porterduff mode. 22 // with a porterduff mode.
21 static const struct Pair { 23 static const struct Pair {
22 SkPorterDuff::Mode fPD; 24 SkPorterDuff::Mode fPD;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 return find_pdmode(xfmode, pdmode); 80 return find_pdmode(xfmode, pdmode);
79 } 81 }
80 82
81 SkXfermodeProc SkPorterDuff::GetXfermodeProc(Mode mode) { 83 SkXfermodeProc SkPorterDuff::GetXfermodeProc(Mode mode) {
82 return SkXfermode::GetProc(gPairs[mode].fXF); 84 return SkXfermode::GetProc(gPairs[mode].fXF);
83 } 85 }
84 86
85 SkXfermodeProc16 SkPorterDuff::GetXfermodeProc16(Mode mode, SkColor srcColor) { 87 SkXfermodeProc16 SkPorterDuff::GetXfermodeProc16(Mode mode, SkColor srcColor) {
86 return SkXfermode::GetProc16(gPairs[mode].fXF, srcColor); 88 return SkXfermode::GetProc16(gPairs[mode].fXF, srcColor);
87 } 89 }
90
91 #endif
OLDNEW
« no previous file with comments | « include/effects/SkPorterDuff.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698