SkPreConfig.h revision 671cd656785de5e84564b6ffe4831625d7016ded
18a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com/* 28a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com * Copyright (C) 2006 The Android Open Source Project 38a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com * 48a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com * Licensed under the Apache License, Version 2.0 (the "License"); 58a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com * you may not use this file except in compliance with the License. 68a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com * You may obtain a copy of the License at 78a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com * 88a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com * http://www.apache.org/licenses/LICENSE-2.0 98a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com * 108a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com * Unless required by applicable law or agreed to in writing, software 118a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com * distributed under the License is distributed on an "AS IS" BASIS, 128a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 138a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com * See the License for the specific language governing permissions and 148a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com * limitations under the License. 158a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com */ 168a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 178a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#ifndef SkPreConfig_DEFINED 188a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#define SkPreConfig_DEFINED 198a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 208a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com////////////////////////////////////////////////////////////////////// 218a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 22671cd656785de5e84564b6ffe4831625d7016dedreed@android.com#if !defined(SK_BUILD_FOR_PALM) && !defined(SK_BUILD_FOR_WINCE) && !defined(SK_BUILD_FOR_WIN32) && !defined(SK_BUILD_FOR_SYMBIAN) && !defined(SK_BUILD_FOR_UNIX) && !defined(SK_BUILD_FOR_MAC) && !defined(SK_BUILD_FOR_SDL) 238a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 248a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com #if defined(PALMOS_SDK_VERSION) 258a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com #define SK_BUILD_FOR_PALM 268a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com #elif defined(UNDER_CE) 278a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com #define SK_BUILD_FOR_WINCE 288a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com #elif defined(WIN32) 298a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com #define SK_BUILD_FOR_WIN32 308a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com #elif defined(__SYMBIAN32__) 318a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com #define SK_BUILD_FOR_WIN32 328a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com #elif defined(linux) 338a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com #define SK_BUILD_FOR_UNIX 348a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com #else 358a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com #define SK_BUILD_FOR_MAC 368a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com #endif 378a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 388a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#endif 398a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 408a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com////////////////////////////////////////////////////////////////////// 418a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 428a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#if !defined(SK_DEBUG) && !defined(SK_RELEASE) 438a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com #ifdef NDEBUG 448a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com #define SK_RELEASE 458a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com #else 468a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com #define SK_DEBUG 478a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com #endif 488a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#endif 498a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 508a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com////////////////////////////////////////////////////////////////////// 518a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 525c80ea17d4e4a795bfaeb260fc27e952ba471f1dreed@android.com#if !defined(SK_RESTRICT) 535c80ea17d4e4a795bfaeb260fc27e952ba471f1dreed@android.com #define SK_RESTRICT __restrict__ 545c80ea17d4e4a795bfaeb260fc27e952ba471f1dreed@android.com#endif 558a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 568a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com////////////////////////////////////////////////////////////////////// 578a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 585c80ea17d4e4a795bfaeb260fc27e952ba471f1dreed@android.com#if !defined(SK_SCALAR_IS_FLOAT) && !defined(SK_SCALAR_IS_FIXED) 595c80ea17d4e4a795bfaeb260fc27e952ba471f1dreed@android.com #define SK_SCALAR_IS_FLOAT 605c80ea17d4e4a795bfaeb260fc27e952ba471f1dreed@android.com #define SK_CAN_USE_FLOAT 618a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#endif 628a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 638a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com////////////////////////////////////////////////////////////////////// 648a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 658a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#if !defined(SK_CPU_BENDIAN) && !defined(SK_CPU_LENDIAN) 668a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com #if defined (__ppc__) || defined(__ppc64__) 678a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com #define SK_CPU_BENDIAN 688a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com #else 698a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com #define SK_CPU_LENDIAN 708a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com #endif 718a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#endif 728a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 738a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com////////////////////////////////////////////////////////////////////// 748a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 758a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#if (defined(__arm__) && !defined(__thumb__)) || defined(SK_BUILD_FOR_BREW) || defined(SK_BUILD_FOR_WINCE) || (defined(SK_BUILD_FOR_SYMBIAN) && !defined(__MARM_THUMB__)) 768a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com /* e.g. the ARM instructions have conditional execution, making tiny branches cheap */ 778a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com #define SK_CPU_HAS_CONDITIONAL_INSTR 788a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#endif 798a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 808a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#endif 818a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 82