Index: Source/core/html/canvas/WebGLRenderingContext.cpp |
diff --git a/Source/core/html/canvas/WebGLRenderingContext.cpp b/Source/core/html/canvas/WebGLRenderingContext.cpp |
index b41a88dd16c7c39edf2b3e1aca1ad0e0da581d72..3f8e375d3e7e675fdaae90f88bce60d3dcb53f31 100644 |
--- a/Source/core/html/canvas/WebGLRenderingContext.cpp |
+++ b/Source/core/html/canvas/WebGLRenderingContext.cpp |
@@ -85,9 +85,17 @@ PassOwnPtrWillBeRawPtr<WebGLRenderingContext> WebGLRenderingContext::create(HTML |
attrs = defaultAttrs.get(); |
} |
blink::WebGraphicsContext3D::Attributes attributes = attrs->attributes(document.topDocument().url().string(), settings, 1); |
- OwnPtr<blink::WebGraphicsContext3D> context = adoptPtr(blink::Platform::current()->createOffscreenGraphicsContext3D(attributes, 0)); |
+ blink::WebGLInfo glInfo; |
+ OwnPtr<blink::WebGraphicsContext3D> context = adoptPtr(blink::Platform::current()->createOffscreenGraphicsContext3D(attributes, 0, &glInfo)); |
if (!context) { |
- canvas->dispatchEvent(WebGLContextEvent::create(EventTypeNames::webglcontextcreationerror, false, true, "Could not create a WebGL context.")); |
+ String statusMessage("Could not create a WebGL context for VendorInfo = "); |
+ statusMessage.append(glInfo.vendorInfo); |
+ statusMessage.append(", RendererInfo = "); |
+ statusMessage.append(glInfo.rendererInfo); |
+ statusMessage.append(", DriverInfo = "); |
+ statusMessage.append(glInfo.driverVersion); |
+ statusMessage.append("."); |
+ canvas->dispatchEvent(WebGLContextEvent::create(EventTypeNames::webglcontextcreationerror, false, true, statusMessage)); |
return nullptr; |
} |