diff options
author | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-12 21:01:41 +0000 |
---|---|---|
committer | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-12 21:01:41 +0000 |
commit | 52e935d04c59135739c3a68fb6e19d313dc6d5ad (patch) | |
tree | 95f7ab178b045bef4456cbf92c6aa7e476becd99 /skia/include/corecg/SkFloatingPoint.h | |
parent | 30fab79877b4bb067944b74d98346ac9bb6bfc7e (diff) | |
download | chromium_src-52e935d04c59135739c3a68fb6e19d313dc6d5ad.zip chromium_src-52e935d04c59135739c3a68fb6e19d313dc6d5ad.tar.gz chromium_src-52e935d04c59135739c3a68fb6e19d313dc6d5ad.tar.bz2 |
New drop of Skia. This is up to CL 121320.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6925 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/include/corecg/SkFloatingPoint.h')
-rw-r--r-- | skia/include/corecg/SkFloatingPoint.h | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/skia/include/corecg/SkFloatingPoint.h b/skia/include/corecg/SkFloatingPoint.h index b7c0435..d3a6fc5 100644 --- a/skia/include/corecg/SkFloatingPoint.h +++ b/skia/include/corecg/SkFloatingPoint.h @@ -1,19 +1,18 @@ -/* include/corecg/SkFloatingPoint.h -** -** Copyright 2006, Google Inc. -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ +/* + * Copyright (C) 2006 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ #ifndef SkFloatingPoint_DEFINED #define SkFloatingPoint_DEFINED @@ -24,6 +23,7 @@ #include <math.h> #include <float.h> +#include "SkFloatBits.h" #ifdef SK_BUILD_FOR_WINCE #define sk_float_sqrt(x) (float)::sqrt(x) @@ -61,5 +61,15 @@ #define sk_float_isNaN(x) _isnan(x) #endif +#ifdef SK_USE_FLOATBITS + #define sk_float_floor2int(x) SkFloatToIntFloor(x) + #define sk_float_round2int(x) SkFloatToIntRound(x) + #define sk_float_ceil2int(x) SkFloatToIntCeil(x) +#else + #define sk_float_floor2int(x) (int)sk_float_floor(x) + #define sk_float_round2int(x) (int)sk_float_floor((x) + 0.5f) + #define sk_float_ceil2int(x) (int)sk_float_ceil(x) +#endif + #endif #endif |