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

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

Issue 26167002: Make skia almost compile again with clang. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/core/SkRTree.cpp ('k') | src/utils/SkMatrix44.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 9
10 #include "SkXfermode.h" 10 #include "SkXfermode.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 static inline int clamp_div255round(int prod) { 54 static inline int clamp_div255round(int prod) {
55 if (prod <= 0) { 55 if (prod <= 0) {
56 return 0; 56 return 0;
57 } else if (prod >= 255*255) { 57 } else if (prod >= 255*255) {
58 return 255; 58 return 255;
59 } else { 59 } else {
60 return SkDiv255Round(prod); 60 return SkDiv255Round(prod);
61 } 61 }
62 } 62 }
63 63
64 static inline int clamp_max(int value, int max) {
65 if (value > max) {
66 value = max;
67 }
68 return value;
69 }
70
71 /////////////////////////////////////////////////////////////////////////////// 64 ///////////////////////////////////////////////////////////////////////////////
72 65
73 // kClear_Mode, //!< [0, 0] 66 // kClear_Mode, //!< [0, 0]
74 static SkPMColor clear_modeproc(SkPMColor src, SkPMColor dst) { 67 static SkPMColor clear_modeproc(SkPMColor src, SkPMColor dst) {
75 return 0; 68 return 0;
76 } 69 }
77 70
78 // kSrc_Mode, //!< [Sa, Sc] 71 // kSrc_Mode, //!< [Sa, Sc]
79 static SkPMColor src_modeproc(SkPMColor src, SkPMColor dst) { 72 static SkPMColor src_modeproc(SkPMColor src, SkPMColor dst) {
80 return src; 73 return src;
(...skipping 1882 matching lines...) Expand 10 before | Expand all | Expand 10 after
1963 return proc16; 1956 return proc16;
1964 } 1957 }
1965 1958
1966 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkXfermode) 1959 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkXfermode)
1967 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkProcCoeffXfermode) 1960 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkProcCoeffXfermode)
1968 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkClearXfermode) 1961 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkClearXfermode)
1969 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSrcXfermode) 1962 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSrcXfermode)
1970 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDstInXfermode) 1963 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDstInXfermode)
1971 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDstOutXfermode) 1964 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDstOutXfermode)
1972 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 1965 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « src/core/SkRTree.cpp ('k') | src/utils/SkMatrix44.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698