mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 958596 - Allow gfx/2d/Logging.h to be used outside of gfx/2d. r=Bas
--HG-- extra : rebase_source : 7c99fccae55d8116f12b52ed74e178590c2c7414
This commit is contained in:
parent
07ee624b77
commit
0752ed82aa
@ -7719,6 +7719,7 @@ XPCOM_LIBS="$LIBXUL_LIBS"
|
||||
|
||||
if test "$OS_ARCH" = "WINNT"; then
|
||||
GKMEDIAS_SHARED_LIBRARY=1
|
||||
AC_DEFINE(GKMEDIAS_SHARED_LIBRARY)
|
||||
fi
|
||||
AC_SUBST(GKMEDIAS_SHARED_LIBRARY)
|
||||
|
||||
|
@ -53,7 +53,7 @@
|
||||
|
||||
#include "mozilla/CheckedInt.h"
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
#if defined(DEBUG) || defined(PR_LOGGING)
|
||||
PRLogModuleInfo *
|
||||
GetGFX2DLog()
|
||||
{
|
||||
@ -156,7 +156,7 @@ namespace mozilla {
|
||||
namespace gfx {
|
||||
|
||||
// XXX - Need to define an API to set this.
|
||||
int sGfxLogLevel = LOG_DEBUG;
|
||||
GFX2D_API int sGfxLogLevel = LOG_DEBUG;
|
||||
|
||||
#ifdef WIN32
|
||||
ID3D10Device1 *Factory::mD3D10Device;
|
||||
|
@ -14,10 +14,17 @@
|
||||
#include "Matrix.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
// This file gets included from nsGlobalWindow.cpp, which doesn't like
|
||||
// having windows.h included in it. Since OutputDebugStringA is the only
|
||||
// thing we need from windows.h, we just declare it here directly.
|
||||
// Note: the function's documented signature is
|
||||
// WINBASEAPI void WINAPI OutputDebugStringA(LPCSTR lpOutputString)
|
||||
// but if we don't include windows.h, the macros WINBASEAPI, WINAPI, and
|
||||
// LPCSTR are not defined, so we need to replace them with their expansions.
|
||||
extern "C" __declspec(dllimport) void __stdcall OutputDebugStringA(const char* lpOutputString);
|
||||
#endif
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
#if defined(DEBUG) || defined(PR_LOGGING)
|
||||
#include <prlog.h>
|
||||
|
||||
extern PRLogModuleInfo *GetGFX2DLog();
|
||||
@ -29,7 +36,7 @@ namespace gfx {
|
||||
const int LOG_DEBUG = 1;
|
||||
const int LOG_WARNING = 2;
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
#if defined(DEBUG) || defined(PR_LOGGING)
|
||||
|
||||
inline PRLogModuleLevel PRLogLevelForLevel(int aLevel) {
|
||||
switch (aLevel) {
|
||||
@ -43,7 +50,7 @@ inline PRLogModuleLevel PRLogLevelForLevel(int aLevel) {
|
||||
|
||||
#endif
|
||||
|
||||
extern int sGfxLogLevel;
|
||||
extern GFX2D_API int sGfxLogLevel;
|
||||
|
||||
static inline void OutputMessage(const std::string &aString, int aLevel) {
|
||||
#if defined(WIN32) && !defined(PR_LOGGING)
|
||||
|
@ -97,7 +97,7 @@ struct RectTyped :
|
||||
Super(float(rect.x), float(rect.y),
|
||||
float(rect.width), float(rect.height)) {}
|
||||
|
||||
GFX2D_API void NudgeToIntegers()
|
||||
void NudgeToIntegers()
|
||||
{
|
||||
NudgeToInteger(&(this->x));
|
||||
NudgeToInteger(&(this->y));
|
||||
|
@ -246,7 +246,7 @@ struct GradientStop
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(XP_WIN) && defined(MOZ_GFX)
|
||||
#if defined(XP_WIN) && defined(GKMEDIAS_SHARED_LIBRARY)
|
||||
#ifdef GFX2D_INTERNAL
|
||||
#define GFX2D_API __declspec(dllexport)
|
||||
#else
|
||||
|
@ -21,6 +21,7 @@ EXPORTS.mozilla.gfx += [
|
||||
'DataSurfaceHelpers.h',
|
||||
'Filters.h',
|
||||
'Helpers.h',
|
||||
'Logging.h',
|
||||
'Matrix.h',
|
||||
'PathHelpers.h',
|
||||
'Point.h',
|
||||
|
Loading…
Reference in New Issue
Block a user