Fix link errors caused by static use of perf related functions even when…

Fix link errors caused by static use of perf related functions even when ANGLE_DISABLE_PERF is defined. Bug=225 Author: Mark Callow git-svn-id: https://angleproject.googlecode.com/svn/trunk@788 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 8b3c1afb
...@@ -63,7 +63,11 @@ void trace(bool traceFileDebugOnly, const char *format, ...) ...@@ -63,7 +63,11 @@ void trace(bool traceFileDebugOnly, const char *format, ...)
{ {
va_list vararg; va_list vararg;
va_start(vararg, format); va_start(vararg, format);
#if defined(ANGLE_DISABLE_PERF)
output(traceFileDebugOnly, NULL, format, vararg);
#else
output(traceFileDebugOnly, D3DPERF_SetMarker, format, vararg); output(traceFileDebugOnly, D3DPERF_SetMarker, format, vararg);
#endif
va_end(vararg); va_end(vararg);
} }
...@@ -79,10 +83,12 @@ bool perfActive() ...@@ -79,10 +83,12 @@ bool perfActive()
ScopedPerfEventHelper::ScopedPerfEventHelper(const char* format, ...) ScopedPerfEventHelper::ScopedPerfEventHelper(const char* format, ...)
{ {
#if !defined(ANGLE_DISABLE_PERF)
va_list vararg; va_list vararg;
va_start(vararg, format); va_start(vararg, format);
output(true, reinterpret_cast<PerfOutputFunction>(D3DPERF_BeginEvent), format, vararg); output(true, reinterpret_cast<PerfOutputFunction>(D3DPERF_BeginEvent), format, vararg);
va_end(vararg); va_end(vararg);
#endif
} }
ScopedPerfEventHelper::~ScopedPerfEventHelper() ScopedPerfEventHelper::~ScopedPerfEventHelper()
......
#define MAJOR_VERSION 0 #define MAJOR_VERSION 0
#define MINOR_VERSION 0 #define MINOR_VERSION 0
#define BUILD_VERSION 0 #define BUILD_VERSION 0
#define BUILD_REVISION 787 #define BUILD_REVISION 788
#define STRINGIFY(x) #x #define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x) #define MACRO_STRINGIFY(x) STRINGIFY(x)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment