Commit 97d787fe by jbauman@chromium.org

Don't call gl::output unless perf is enabled.

gl::output allocates a pretty large stack buffer, so it has to call _chkstk. This is rather slow, so avoid calling gl::output if perf and tracing are disabled. BUG= Review URL: https://codereview.appspot.com/6843043 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1390 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent b8a0c19c
...@@ -84,6 +84,12 @@ bool perfActive() ...@@ -84,6 +84,12 @@ bool perfActive()
ScopedPerfEventHelper::ScopedPerfEventHelper(const char* format, ...) ScopedPerfEventHelper::ScopedPerfEventHelper(const char* format, ...)
{ {
#if !defined(ANGLE_DISABLE_PERF) #if !defined(ANGLE_DISABLE_PERF)
#if defined(ANGLE_DISABLE_TRACE)
if (!perfActive())
{
return;
}
#endif
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);
......
#define MAJOR_VERSION 1 #define MAJOR_VERSION 1
#define MINOR_VERSION 0 #define MINOR_VERSION 0
#define BUILD_VERSION 0 #define BUILD_VERSION 0
#define BUILD_REVISION 1389 #define BUILD_REVISION 1390
#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