mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 557896: Display information on the error console when using a OpenGL layer manager. r=joedrew
This commit is contained in:
parent
dbf2d3e55f
commit
13f8690159
@ -46,6 +46,9 @@
|
||||
|
||||
#include "glWrapper.h"
|
||||
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIConsoleService.h"
|
||||
|
||||
static const GLint VERTEX_ATTRIB_LOCATION = 0;
|
||||
|
||||
namespace mozilla {
|
||||
@ -171,6 +174,24 @@ LayerManagerOGL::Initialize()
|
||||
mYCbCrLayerProgram->SetCbTexture(1);
|
||||
mYCbCrLayerProgram->SetCrTexture(2);
|
||||
|
||||
nsCOMPtr<nsIConsoleService>
|
||||
console(do_GetService(NS_CONSOLESERVICE_CONTRACTID));
|
||||
|
||||
if (console) {
|
||||
nsString msg;
|
||||
msg +=
|
||||
NS_LITERAL_STRING("OpenGL LayerManager Initialized Succesfully.\nVersion: ");
|
||||
msg += NS_ConvertUTF8toUTF16(
|
||||
nsDependentCString((const char*)sglWrapper.GetString(LOCAL_GL_VERSION)));
|
||||
msg += NS_LITERAL_STRING("\nVendor: ");
|
||||
msg += NS_ConvertUTF8toUTF16(
|
||||
nsDependentCString((const char*)sglWrapper.GetString(LOCAL_GL_VENDOR)));
|
||||
msg += NS_LITERAL_STRING("\nRenderer: ");
|
||||
msg += NS_ConvertUTF8toUTF16(
|
||||
nsDependentCString((const char*)sglWrapper.GetString(LOCAL_GL_RENDERER)));
|
||||
console->LogStringMessage(msg.get());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user