diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-03-21 19:51:57 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-03-21 19:51:57 +0000 |
commit | 918261018f7a7754a5e7f0fbb6ec96f9b269fd26 (patch) | |
tree | 3b604735d28f1bb5eea66c81df6d944712e0f20b /gpu/include/GrConfig.h | |
parent | e6507632c15ddd05c5e7a51f41b94b6208f3ab25 (diff) |
Add GR_DLL builds to Ganesh (minimal exports for Chrome multi-dll for now).
Review URL: http://codereview.appspot.com/4301044/
git-svn-id: http://skia.googlecode.com/svn/trunk@970 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gpu/include/GrConfig.h')
-rw-r--r-- | gpu/include/GrConfig.h | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/gpu/include/GrConfig.h b/gpu/include/GrConfig.h index 780507495d..5a08077002 100644 --- a/gpu/include/GrConfig.h +++ b/gpu/include/GrConfig.h @@ -113,8 +113,9 @@ /////////////////////////////////////////////////////////////////////////////// /* - * Pull stdint.h in before user-config, to be sure our __STDC... macros are - * defined before anyone else might try to include stdint.h + * Include stdint.h with defines that trigger declaration of C99 limit/const + * macros here before anyone else has a chance to include stdint.h without + * these. */ #define __STDC_LIMIT_MACROS #define __STDC_CONSTANT_MACROS @@ -141,6 +142,33 @@ /////////////////////////////////////////////////////////////////////////////// // postconfig section: // + +// GR_IMPLEMENTATION should be define to 1 when building Gr and 0 when including +// it in another dependent build. The Gr makefile/ide-project should define this +// to 1. +#if !defined(GR_IMPLEMENTATION) + #define GR_IMPLEMENTATION 0 +#endif + +// If Gr is built as a shared library then GR_DLL should be defined to 1 (both +// when building Gr and when including its headers in dependent builds). Only +// currently supported minimally for Chrome's Win32 Multi-DLL build (TODO: +// correctly exort all of the public API correctly and support shared lib on +// other platforms). +#if !defined(GR_DLL) + #define GR_DLL 0 +#endif + +#if GR_WIN32_BUILD && GR_DLL + #if GR_IMPLEMENTATION + #define GR_API __declspec(dllexport) + #else + #define GR_API __declspec(dllimport) + #endif +#else + #define GR_API +#endif + // By now we must have a GR_..._BUILD symbol set to 1, and a decision about // debug -vs- release // |