Chromium Code Reviews| Index: Source/core/html/canvas/WebGLRenderingContext.cpp |
| diff --git a/Source/core/html/canvas/WebGLRenderingContext.cpp b/Source/core/html/canvas/WebGLRenderingContext.cpp |
| index d6be7708079fd81171d48e41493f91efe90a97b9..eae14f99b97315fb24c888eb3f64aedf8540cdd4 100644 |
| --- a/Source/core/html/canvas/WebGLRenderingContext.cpp |
| +++ b/Source/core/html/canvas/WebGLRenderingContext.cpp |
| @@ -84,9 +84,20 @@ 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"); |
| + statusMessage.append("VendorInfo= "); |
|
Ken Russell (switch to Gerrit)
2014/11/04 00:37:49
Combine these two constant strings. Add space betw
sivag
2014/11/04 12:33:32
Done.
|
| + statusMessage.append(glInfo.vendorInfo); |
| + statusMessage.append(","); |
| + statusMessage.append("RendererInfo= "); |
|
Ken Russell (switch to Gerrit)
2014/11/04 00:37:49
Combine the adjacent constant strings here and bel
sivag
2014/11/04 12:33:32
Done.
|
| + statusMessage.append(glInfo.rendererInfo); |
| + statusMessage.append(","); |
| + statusMessage.append("DriverInfo= "); |
| + statusMessage.append(glInfo.driverVersion); |
| + statusMessage.append(","); |
| + canvas->dispatchEvent(WebGLContextEvent::create(EventTypeNames::webglcontextcreationerror, false, true, statusMessage)); |
| return nullptr; |
| } |