зеркало из https://github.com/AvaloniaUI/angle.git
Log EGL initialize errors to the platform.
This will allow us to show more extended error info in about:gpu in Chromium. BUG=angleproject:966 BUG=515229 Change-Id: I24c8f33ac3576395ff13dbf7f4664c649af18e33 Reviewed-on: https://chromium-review.googlesource.com/289590 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Родитель
2e5b500c05
Коммит
2e5797e3cd
|
@ -30,3 +30,6 @@ AccessModifierOffset: -2
|
|||
|
||||
# TODO(jmadill): Decide if we want this on. Doesn't have an "all or none" mode.
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
|
||||
# Useful for spacing out functions in classes
|
||||
KeepEmptyLinesAtTheStartOfBlocks: true
|
||||
|
|
|
@ -31,6 +31,17 @@ class Platform
|
|||
// it is recommended that the fixed point be no further in the past than the epoch.
|
||||
virtual double monotonicallyIncreasingTime() { return 0; }
|
||||
|
||||
// Logging ------------------------------------------------------------
|
||||
|
||||
// Log an error message within the platform implementation.
|
||||
virtual void logError(const char *errorMessage) {}
|
||||
|
||||
// Log a warning message within the platform implementation.
|
||||
virtual void logWarning(const char *warningMessage) {}
|
||||
|
||||
// Log an info message within the platform implementation.
|
||||
virtual void logInfo(const char *infoMessage) {}
|
||||
|
||||
// Tracing --------
|
||||
|
||||
// Get a pointer to the enabled state of the given trace category. The
|
||||
|
|
|
@ -255,6 +255,11 @@ Error Display::initialize()
|
|||
Error error = mImplementation->initialize(this);
|
||||
if (error.isError())
|
||||
{
|
||||
// Log extended error message here
|
||||
std::stringstream errorStream;
|
||||
errorStream << "ANGLE Display::initialize error " << error.getID() << ": "
|
||||
<< error.getMessage();
|
||||
ANGLEPlatformCurrent()->logError(errorStream.str().c_str());
|
||||
return error;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче