mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 696437 - Add OpenGL Gfx AppNotes for mobile. r=bjacob
This commit is contained in:
parent
377d6a1587
commit
81c9e329a5
@ -87,6 +87,7 @@ GfxInfo::GetCleartypeParameters(nsAString & aCleartypeParams)
|
||||
nsresult
|
||||
GfxInfo::Init()
|
||||
{
|
||||
mSetCrashReportAnnotations = false;
|
||||
return GfxInfoBase::Init();
|
||||
}
|
||||
|
||||
@ -220,15 +221,16 @@ GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active)
|
||||
}
|
||||
|
||||
void
|
||||
GfxInfo::AddCrashReportAnnotations()
|
||||
GfxInfo::AddOpenGLCrashReportAnnotations()
|
||||
{
|
||||
#if 0
|
||||
#if defined(MOZ_CRASHREPORTER)
|
||||
nsCAutoString deviceIDString, vendorIDString;
|
||||
nsAutoString adapterDescriptionString;
|
||||
PRUint32 deviceID, vendorID;
|
||||
|
||||
GetAdapterDeviceID(&deviceID);
|
||||
GetAdapterVendorID(&vendorID);
|
||||
GetAdapterDescription(adapterDescriptionString);
|
||||
|
||||
deviceIDString.AppendPrintf("%04x", deviceID);
|
||||
vendorIDString.AppendPrintf("%04x", vendorID);
|
||||
@ -243,20 +245,12 @@ GfxInfo::AddCrashReportAnnotations()
|
||||
nsCAutoString note;
|
||||
/* AppendPrintf only supports 32 character strings, mrghh. */
|
||||
note.AppendPrintf("AdapterVendorID: %04x, ", vendorID);
|
||||
note.AppendPrintf("AdapterDeviceID: %04x", deviceID);
|
||||
|
||||
if (vendorID == 0) {
|
||||
/* if we didn't find a valid vendorID lets append the mDeviceID string to try to find out why */
|
||||
note.Append(", ");
|
||||
note.AppendWithConversion(mDeviceID);
|
||||
note.Append(", ");
|
||||
note.AppendWithConversion(mDeviceKeyDebug);
|
||||
}
|
||||
note.AppendPrintf("AdapterDeviceID: %04x.", deviceID);
|
||||
note.Append("\n");
|
||||
note.AppendPrintf("AdapterDescription: '%s'.", NS_ConvertUTF16toUTF8(adapterDescriptionString).get());
|
||||
note.Append("\n");
|
||||
|
||||
CrashReporter::AppendAppNotesToCrashReport(note);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -275,6 +269,11 @@ GfxInfo::GetFeatureStatusImpl(PRInt32 aFeature, PRInt32 *aStatus, nsAString & aS
|
||||
}
|
||||
|
||||
if (aFeature == FEATURE_OPENGL_LAYERS) {
|
||||
if (!mSetCrashReportAnnotations) {
|
||||
AddOpenGLCrashReportAnnotations();
|
||||
mSetCrashReportAnnotations = true;
|
||||
}
|
||||
|
||||
/* XXX: Use this code when we're ready to whitelist devices. */
|
||||
// nsAutoString str;
|
||||
// /* Whitelist Galaxy S phones */
|
||||
|
@ -84,7 +84,8 @@ protected:
|
||||
|
||||
private:
|
||||
|
||||
void AddCrashReportAnnotations();
|
||||
void AddOpenGLCrashReportAnnotations();
|
||||
bool mSetCrashReportAnnotations;
|
||||
nsString mRendererIDsString;
|
||||
nsString mAdapterRAMString;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user