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

Side by Side Diff: src/core/SkXfermode.cpp

Issue 1324743002: Clean up remaining users of SkPMFloat (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: scale_rgb Created 5 years, 3 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/core/SkPMFloat.h ('k') | src/effects/SkColorMatrixFilter.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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
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 #include "SkXfermode.h" 9 #include "SkXfermode.h"
10 #include "SkXfermode_proccoeff.h" 10 #include "SkXfermode_proccoeff.h"
11 #include "SkColorPriv.h" 11 #include "SkColorPriv.h"
12 #include "SkLazyPtr.h" 12 #include "SkLazyPtr.h"
13 #include "SkMathPriv.h" 13 #include "SkMathPriv.h"
14 #include "SkOpts.h" 14 #include "SkOpts.h"
15 #include "SkPMFloat.h"
16 #include "SkReadBuffer.h" 15 #include "SkReadBuffer.h"
17 #include "SkString.h" 16 #include "SkString.h"
18 #include "SkWriteBuffer.h" 17 #include "SkWriteBuffer.h"
19 18
20 #define SkAlphaMulAlpha(a, b) SkMulDiv255Round(a, b) 19 #define SkAlphaMulAlpha(a, b) SkMulDiv255Round(a, b)
21 20
22 static inline unsigned saturated_add(unsigned a, unsigned b) { 21 static inline unsigned saturated_add(unsigned a, unsigned b) {
23 SkASSERT(a <= 255); 22 SkASSERT(a <= 255);
24 SkASSERT(b <= 255); 23 SkASSERT(b <= 255);
25 unsigned sum = a + b; 24 unsigned sum = a + b;
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 if (!xfer) { 1093 if (!xfer) {
1095 return SkXfermode::kOpaque_SrcColorOpacity == opacityType; 1094 return SkXfermode::kOpaque_SrcColorOpacity == opacityType;
1096 } 1095 }
1097 1096
1098 return xfer->isOpaque(opacityType); 1097 return xfer->isOpaque(opacityType);
1099 } 1098 }
1100 1099
1101 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkXfermode) 1100 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkXfermode)
1102 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkProcCoeffXfermode) 1101 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkProcCoeffXfermode)
1103 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 1102 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « src/core/SkPMFloat.h ('k') | src/effects/SkColorMatrixFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698