Commit b60fe31f by Jamie Madill

Fix the ANGLE_ENABLE_TRACE build.

We needed to include angleutils.cpp in libtranslator for this to compile. Also allow the event helpers to record API calls even if ANGLE_ENABLE_PERF is off. BUG=angle:513 Change-Id: I2646d5ebeae536a4a7f1cd7ecaf0ce019ce5ff76 Reviewed-on: https://chromium-review.googlesource.com/219756Tested-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarShannon Woods <shannonwoods@chromium.org>
parent ae5122c4
...@@ -307,6 +307,7 @@ ...@@ -307,6 +307,7 @@
<ClCompile Include="..\..\src\common\RefCountObject.cpp"/> <ClCompile Include="..\..\src\common\RefCountObject.cpp"/>
<ClCompile Include="..\..\src\common\mathutil.cpp"/> <ClCompile Include="..\..\src\common\mathutil.cpp"/>
<ClCompile Include="..\..\src\common\debug.cpp"/> <ClCompile Include="..\..\src\common\debug.cpp"/>
<ClCompile Include="..\..\src\common\angleutils.cpp"/>
<ClCompile Include="..\..\src\common\blocklayout.cpp"/> <ClCompile Include="..\..\src\common\blocklayout.cpp"/>
<ClCompile Include="..\..\src\compiler\translator\InfoSink.cpp"/> <ClCompile Include="..\..\src\compiler\translator\InfoSink.cpp"/>
<ClCompile Include="..\..\src\compiler\translator\OutputESSL.cpp"/> <ClCompile Include="..\..\src\compiler\translator\OutputESSL.cpp"/>
......
...@@ -99,6 +99,9 @@ ...@@ -99,6 +99,9 @@
<ClInclude Include="..\..\src\common\utilities.h"> <ClInclude Include="..\..\src\common\utilities.h">
<Filter>src\common</Filter> <Filter>src\common</Filter>
</ClInclude> </ClInclude>
<ClCompile Include="..\..\src\common\angleutils.cpp">
<Filter>src\common</Filter>
</ClCompile>
<ClCompile Include="..\..\src\common\blocklayout.cpp"> <ClCompile Include="..\..\src\common\blocklayout.cpp">
<Filter>src\common</Filter> <Filter>src\common</Filter>
</ClCompile> </ClCompile>
......
...@@ -87,7 +87,6 @@ bool perfActive() ...@@ -87,7 +87,6 @@ bool perfActive()
ScopedPerfEventHelper::ScopedPerfEventHelper(const char* format, ...) ScopedPerfEventHelper::ScopedPerfEventHelper(const char* format, ...)
{ {
#if defined(ANGLE_ENABLE_PERF)
#if !defined(ANGLE_ENABLE_TRACE) #if !defined(ANGLE_ENABLE_TRACE)
if (!perfActive()) if (!perfActive())
{ {
...@@ -96,9 +95,12 @@ ScopedPerfEventHelper::ScopedPerfEventHelper(const char* format, ...) ...@@ -96,9 +95,12 @@ ScopedPerfEventHelper::ScopedPerfEventHelper(const char* format, ...)
#endif // !ANGLE_ENABLE_TRACE #endif // !ANGLE_ENABLE_TRACE
va_list vararg; va_list vararg;
va_start(vararg, format); va_start(vararg, format);
#if defined(ANGLE_ENABLE_PERF)
output(true, reinterpret_cast<PerfOutputFunction>(D3DPERF_BeginEvent), format, vararg); output(true, reinterpret_cast<PerfOutputFunction>(D3DPERF_BeginEvent), format, vararg);
va_end(vararg); #else
output(true, NULL, format, vararg);
#endif // ANGLE_ENABLE_PERF #endif // ANGLE_ENABLE_PERF
va_end(vararg);
} }
ScopedPerfEventHelper::~ScopedPerfEventHelper() ScopedPerfEventHelper::~ScopedPerfEventHelper()
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
'common/RefCountObject.cpp', 'common/RefCountObject.cpp',
'common/RefCountObject.h', 'common/RefCountObject.h',
'common/angleutils.h', 'common/angleutils.h',
'common/angleutils.cpp',
'common/blocklayout.cpp', 'common/blocklayout.cpp',
'common/blocklayout.h', 'common/blocklayout.h',
'common/debug.cpp', 'common/debug.cpp',
......
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