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

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

Issue 117053002: remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floats (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
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 SkFixed_DEFINED 10 #ifndef SkFixed_DEFINED
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 /////////////////////////////////////////////////////////////////////////////// 275 ///////////////////////////////////////////////////////////////////////////////
276 276
277 typedef int64_t SkFixed48; 277 typedef int64_t SkFixed48;
278 278
279 #define SkIntToFixed48(x) ((SkFixed48)(x) << 48) 279 #define SkIntToFixed48(x) ((SkFixed48)(x) << 48)
280 #define SkFixed48ToInt(x) ((int)((x) >> 48)) 280 #define SkFixed48ToInt(x) ((int)((x) >> 48))
281 #define SkFixedToFixed48(x) ((SkFixed48)(x) << 32) 281 #define SkFixedToFixed48(x) ((SkFixed48)(x) << 32)
282 #define SkFixed48ToFixed(x) ((SkFixed)((x) >> 32)) 282 #define SkFixed48ToFixed(x) ((SkFixed)((x) >> 32))
283 #define SkFloatToFixed48(x) ((SkFixed48)((x) * (65536.0f * 65536.0f * 65536. 0f))) 283 #define SkFloatToFixed48(x) ((SkFixed48)((x) * (65536.0f * 65536.0f * 65536. 0f)))
284 284
285 #ifdef SK_SCALAR_IS_FLOAT 285 #define SkScalarToFixed48(x) SkFloatToFixed48(x)
286 #define SkScalarToFixed48(x) SkFloatToFixed48(x)
287 #else
288 #define SkScalarToFixed48(x) SkFixedToFixed48(x)
289 #endif
290 286
291 #endif 287 #endif
OLDNEW
« no previous file with comments | « include/config/SkUserConfig.h ('k') | include/core/SkFloatBits.h » ('j') | src/core/SkCanvas.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698