Namespace Log.h/cpp in dawn::

The LogMessage::LogMessage constructor was redefining a symbol that
exists in re2 inside of Chromium. So we namespace Log inside dawn:: to
avoid the conflict.

BUG=dawn:302

Change-Id: Ida349208e2c6fe9ac032e1bd8cd442dff0b3f6bc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14320
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
Corentin Wallez
2019-12-06 18:21:39 +00:00
committed by Commit Bot service account
parent dd4584340d
commit dc3317da6c
12 changed files with 170 additions and 158 deletions

View File

@@ -102,11 +102,11 @@ namespace dawn_native { namespace opengl {
}
if (type == GL_DEBUG_TYPE_ERROR) {
WarningLog() << "OpenGL error:"
<< "\n Source: " << sourceText //
<< "\n ID: " << id //
<< "\n Severity: " << severityText //
<< "\n Message: " << message;
dawn::WarningLog() << "OpenGL error:"
<< "\n Source: " << sourceText //
<< "\n ID: " << id //
<< "\n Severity: " << severityText //
<< "\n Message: " << message;
// Abort on an error when in Debug mode.
UNREACHABLE();

View File

@@ -64,7 +64,8 @@ namespace dawn_native { namespace opengl {
if (infoLogLength > 1) {
std::vector<char> buffer(infoLogLength);
gl.GetShaderInfoLog(shader, infoLogLength, nullptr, &buffer[0]);
ErrorLog() << source << "\nProgram compilation failed:\n" << buffer.data();
dawn::ErrorLog() << source << "\nProgram compilation failed:\n"
<< buffer.data();
}
}
return shader;
@@ -95,7 +96,7 @@ namespace dawn_native { namespace opengl {
if (infoLogLength > 1) {
std::vector<char> buffer(infoLogLength);
gl.GetProgramInfoLog(mProgram, infoLogLength, nullptr, &buffer[0]);
ErrorLog() << "Program link failed:\n" << buffer.data();
dawn::ErrorLog() << "Program link failed:\n" << buffer.data();
}
}