Author :
Austin Kinross
Date :
2015-01-14 17:26:32
Hash :3940a453 Message :Only call std::string constructor in gl::Error when necessary
std::string's constructor is very expensive in debug builds.
In some applications we have seen it use 10% of the CPU.
This change makes (e)gl::Error store a pointer to an std::string,
and only create a string when necessary.
Change-Id: I78bfbda86568944681517fe32df9d1556e4ebee7
Reviewed-on: https://chromium-review.googlesource.com/240495
Tested-by: Austin Kinross <aukinros@microsoft.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>