Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(597)

Unified Diff: Source/core/html/canvas/WebGLRenderingContextBase.cpp

Issue 826363002: Webgl Info should have vendorid and deviceid of gpu. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed unittest issue. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/canvas/webgl/webgl-error-response.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/WebGLRenderingContextBase.cpp
diff --git a/Source/core/html/canvas/WebGLRenderingContextBase.cpp b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
index 165df0a54681f15019fd284bc5759be57361ffb0..ffd09849733bf13de1cc3b4a73ad3e7beb27f24d 100644
--- a/Source/core/html/canvas/WebGLRenderingContextBase.cpp
+++ b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
@@ -573,15 +573,25 @@ PassOwnPtr<blink::WebGraphicsContext3D> WebGLRenderingContextBase::createWebGrap
shouldFailContextCreationForTesting = false;
String statusMessage;
if (!glInfo.contextInfoCollectionFailure.isEmpty()) {
- statusMessage.append("Could not create a WebGL context.");
+ statusMessage.append("Could not create a WebGL context. ");
statusMessage.append(glInfo.contextInfoCollectionFailure);
+ String vendorId = String::number(glInfo.vendorId);
+ String deviceId = String::number(glInfo.deviceId);
+ if (vendorId.isEmpty())
+ statusMessage.append("VendorId = Not Available");
+ else
+ statusMessage.append("VendorId = " + vendorId);
+ if (deviceId.isEmpty())
+ statusMessage.append(", DeviceId = Not Available");
+ else
+ statusMessage.append(", DeviceId = " + deviceId);
} else {
statusMessage.append("Could not create a WebGL context");
if (!glInfo.vendorInfo.isEmpty()) {
- statusMessage.append(" VendorInfo = ");
+ statusMessage.append(", VendorInfo = ");
statusMessage.append(glInfo.vendorInfo);
} else {
- statusMessage.append(" VendorInfo = Not Available");
+ statusMessage.append(", VendorInfo = Not Available");
}
if (!glInfo.rendererInfo.isEmpty()) {
statusMessage.append(", RendererInfo = ");
« no previous file with comments | « LayoutTests/fast/canvas/webgl/webgl-error-response.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698