зеркало из https://github.com/mozilla/moz-skia.git
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
This commit is contained in:
Родитель
e6507632c1
Коммит
918261018f
2
Makefile
2
Makefile
|
@ -26,6 +26,8 @@ else
|
|||
DEFINES += -DSK_RELEASE -DGR_DEBUG=0
|
||||
endif
|
||||
|
||||
DEFINES += -DGR_IMPLEMENTATION=1
|
||||
|
||||
DEFINES += -DSK_SUPPORT_LCDTEXT
|
||||
|
||||
ifneq ($(SKIA_PDF_SUPPORT),false)
|
||||
|
|
|
@ -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
|
||||
//
|
||||
|
|
|
@ -29,7 +29,7 @@ class GrIndexBufferAllocPool;
|
|||
class GrInOrderDrawBuffer;
|
||||
class GrPathRenderer;
|
||||
|
||||
class GrContext : public GrRefCnt {
|
||||
class GR_API GrContext : public GrRefCnt {
|
||||
public:
|
||||
/**
|
||||
* Creates a GrContext from within a 3D context.
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#define GrGLInterface_DEFINED
|
||||
|
||||
#include "GrGLPlatformIncludes.h"
|
||||
#include "GrTypes.h"
|
||||
|
||||
#if !defined(GR_GL_FUNCTION_TYPE)
|
||||
#define GR_GL_FUNCTION_TYPE
|
||||
|
@ -38,8 +39,8 @@ void gl_version(int* major, int* minor);
|
|||
* Routines managing the global interface used to invoke OpenGL calls.
|
||||
*/
|
||||
struct GrGLInterface;
|
||||
extern GrGLInterface* GrGLGetGLInterface();
|
||||
extern void GrGLSetGLInterface(GrGLInterface* gl_interface);
|
||||
GR_API GrGLInterface* GrGLGetGLInterface();
|
||||
GR_API void GrGLSetGLInterface(GrGLInterface* gl_interface);
|
||||
|
||||
/*
|
||||
* Populates the global GrGLInterface pointer with an instance pointing to the
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
* Base for classes that want to disallow copying themselves. It makes its
|
||||
* copy-constructor and assignment operators private (and unimplemented).
|
||||
*/
|
||||
class GrNoncopyable {
|
||||
class GR_API GrNoncopyable {
|
||||
public:
|
||||
GrNoncopyable() {}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
* It is an error (though only checked for in the debug build) to call unref()
|
||||
* such that the reference count becomes 0.
|
||||
*/
|
||||
class GrRefCnt : GrNoncopyable {
|
||||
class GR_API GrRefCnt : GrNoncopyable {
|
||||
public:
|
||||
GrRefCnt() : fRefCnt(1) {}
|
||||
virtual ~GrRefCnt() {
|
||||
|
|
|
@ -350,11 +350,11 @@ void GrGLInitializeGLInterface(GrGLInterface* glBindings) {
|
|||
|
||||
} // unnamed namespace
|
||||
|
||||
void GrGLSetGLInterface(GrGLInterface* gl_interface) {
|
||||
GR_API void GrGLSetGLInterface(GrGLInterface* gl_interface) {
|
||||
gGLInterface = gl_interface;
|
||||
}
|
||||
|
||||
GrGLInterface* GrGLGetGLInterface() {
|
||||
GR_API GrGLInterface* GrGLGetGLInterface() {
|
||||
return gGLInterface;
|
||||
}
|
||||
|
||||
|
|
11
gyp/skia.gyp
11
gyp/skia.gyp
|
@ -300,7 +300,7 @@
|
|||
'libraries': [
|
||||
'-lfreetype',
|
||||
],
|
||||
},
|
||||
},
|
||||
}],
|
||||
[ 'OS == "mac"', {
|
||||
'include_dirs': [
|
||||
|
@ -932,6 +932,9 @@
|
|||
'../gpu/src/GrTextureCache.cpp',
|
||||
'../gpu/src/gr_unittests.cpp',
|
||||
],
|
||||
'defines': [
|
||||
'GR_IMPLEMENTATION=1',
|
||||
],
|
||||
'conditions': [
|
||||
[ 'OS == "linux"', {
|
||||
'defines': [
|
||||
|
@ -942,7 +945,7 @@
|
|||
'-lGL',
|
||||
'-lX11',
|
||||
],
|
||||
},
|
||||
},
|
||||
}],
|
||||
[ 'OS == "mac"', {
|
||||
'defines': [
|
||||
|
@ -952,7 +955,7 @@
|
|||
'libraries': [
|
||||
'$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
|
||||
],
|
||||
},
|
||||
},
|
||||
}],
|
||||
[ 'OS == "win"', {
|
||||
'defines': [
|
||||
|
@ -1015,7 +1018,7 @@
|
|||
'../src/animator/SkAnimatorScript.cpp',
|
||||
'../src/animator/SkAnimatorScript.h',
|
||||
#'../src/animator/SkAnimatorScript2.cpp', fails on windows
|
||||
#'../src/animator/SkAnimatorScript2.h',
|
||||
#'../src/animator/SkAnimatorScript2.h',
|
||||
'../src/animator/SkBase64.cpp',
|
||||
'../src/animator/SkBase64.h',
|
||||
'../src/animator/SkBoundable.cpp',
|
||||
|
|
|
@ -30,7 +30,7 @@ class GrTextContext;
|
|||
* Subclass of SkDevice, which directs all drawing to the GrGpu owned by the
|
||||
* canvas.
|
||||
*/
|
||||
class SkGpuDevice : public SkDevice {
|
||||
class SK_API SkGpuDevice : public SkDevice {
|
||||
public:
|
||||
/**
|
||||
* The SkGpuDevice will render to the GrRenderTarget, or if the paremeter is
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
class GrContext;
|
||||
|
||||
class SkGpuDeviceFactory : public SkDeviceFactory {
|
||||
class SK_API SkGpuDeviceFactory : public SkDeviceFactory {
|
||||
public:
|
||||
/**
|
||||
* The constructor will ref() the context, passing it to each device
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;GR_DEBUG=1;GR_IMPLEMENTATION=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\include\core;..\..\include\xml;..\..\include\utils;..\..\include\config;..\..\include\views;..\..\src\core;..\..\include\images;..\..\include\effects;..\..\include\gpu;..\..\include\pdf;..\..\gpu\include;..\..\include\ports</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
@ -72,7 +72,7 @@
|
|||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;GR_RELEASE=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;GR_RELEASE=1;GR_IMPLEMENTATION=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\include\core;..\..\include\xml;..\..\include\utils;..\..\include\config;..\..\include\views;..\..\src\core;..\..\include\images;..\..\include\effects;..\..\include\gpu;..\..\include\pdf;..\..\gpu\include;..\..\include\ports</AdditionalIncludeDirectories>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
</ClCompile>
|
||||
|
|
|
@ -540,6 +540,10 @@
|
|||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"GR_IMPLEMENTATION=1",
|
||||
"GR_DEBUG=1",
|
||||
);
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
|
@ -553,7 +557,10 @@
|
|||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = "GR_RELEASE=1";
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"GR_IMPLMENTATION=1",
|
||||
"GR_RELEASE=1",
|
||||
);
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
PREBINDING = NO;
|
||||
|
|
Загрузка…
Ссылка в новой задаче