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

Side by Side Diff: include/core/SkMath.h

Issue 270473003: Make gMask_00FF00FF a constant (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 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 | « include/core/SkColorPriv.h ('k') | src/core/SkBitmapProcState_filter.h » ('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 #ifndef SkMath_DEFINED 10 #ifndef SkMath_DEFINED
11 #define SkMath_DEFINED 11 #define SkMath_DEFINED
12 12
13 #include "SkTypes.h" 13 #include "SkTypes.h"
14 14
15 ///////////////////////////////////////////////////////////////////////////////
16
17 enum { kMask_00FF00FF = 0xFF00FF };
reed1 2014/05/12 14:48:07 I think we should just use 0xFF00FF where the site
pasko 2014/05/12 15:06:19 I agree. Done. Also removed one commented-out left
18
19 ///////////////////////////////////////////////////////////////////////////////
20
15 // 64bit -> 32bit utilities 21 // 64bit -> 32bit utilities
16 22
17 /** 23 /**
18 * Return true iff the 64bit value can exactly be represented in signed 32bits 24 * Return true iff the 64bit value can exactly be represented in signed 32bits
19 */ 25 */
20 static inline bool sk_64_isS32(int64_t value) { 26 static inline bool sk_64_isS32(int64_t value) {
21 return (int32_t)value == value; 27 return (int32_t)value == value;
22 } 28 }
23 29
24 /** 30 /**
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 *div = static_cast<Out>(d); 226 *div = static_cast<Out>(d);
221 *mod = static_cast<Out>(numer-d*denom); 227 *mod = static_cast<Out>(numer-d*denom);
222 #else 228 #else
223 // On x86 this will just be a single idiv. 229 // On x86 this will just be a single idiv.
224 *div = static_cast<Out>(numer/denom); 230 *div = static_cast<Out>(numer/denom);
225 *mod = static_cast<Out>(numer%denom); 231 *mod = static_cast<Out>(numer%denom);
226 #endif // SK_CPU_ARM 232 #endif // SK_CPU_ARM
227 } 233 }
228 234
229 #endif 235 #endif
OLDNEW
« no previous file with comments | « include/core/SkColorPriv.h ('k') | src/core/SkBitmapProcState_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698