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/240495Tested-by:
Austin Kinross <aukinros@microsoft.com>
Reviewed-by:
Jamie Madill <jmadill@chromium.org>
Reviewed-by:
Geoff Lang <geofflang@chromium.org>
Showing
Please
register
or
sign in
to comment