Commit 83b8f7a1 authored by siva.gunturi's avatar siva.gunturi Committed by Commit bot

Handle failures for GPU info collection.

1.)Populate failure strings for GPU info collection when
context_info_state records fatal failure.

2.)The vendorid and deviceid of gpu should give
data on all platforms where context fails to
run.
ex:On mac devices gpu info strings are not
collected (vendor, renderer, driver version),
so populate vendorid and deviceid while collecting
webglinfo which should always be valid.

In case vendor, renderer, driver version are not
populated they will be indicated as "Not Available"
on those platforms.

BUG=412440

Review URL: https://codereview.chromium.org/800483002

Cr-Commit-Position: refs/heads/master@{#315223}
parent d7cae314
......@@ -983,11 +983,27 @@ RendererBlinkPlatformImpl::createOffscreenGraphicsContext3D(
if (gpu_channel_host.get() && gl_info) {
const gpu::GPUInfo& gpu_info = gpu_channel_host->gpu_info();
gl_info->vendorInfo.assign(blink::WebString::fromUTF8(gpu_info.gl_vendor));
gl_info->rendererInfo.assign(
blink::WebString::fromUTF8(gpu_info.gl_renderer));
gl_info->driverVersion.assign(
blink::WebString::fromUTF8(gpu_info.gl_version));
switch (gpu_info.context_info_state) {
case gpu::kCollectInfoSuccess:
case gpu::kCollectInfoNonFatalFailure:
gl_info->vendorInfo.assign(
blink::WebString::fromUTF8(gpu_info.gl_vendor));
gl_info->rendererInfo.assign(
blink::WebString::fromUTF8(gpu_info.gl_renderer));
gl_info->driverVersion.assign(
blink::WebString::fromUTF8(gpu_info.driver_version));
gl_info->vendorId = gpu_info.gpu.vendor_id;
gl_info->deviceId = gpu_info.gpu.device_id;
break;
case gpu::kCollectInfoFatalFailure:
case gpu::kCollectInfoNone:
gl_info->contextInfoCollectionFailure.assign(blink::WebString::fromUTF8(
"GPUInfoCollectionFailure: GPU initialization Failed. GPU "
"Info not Collected."));
break;
default:
NOTREACHED();
};
}
WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits limits;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment