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

Unified Diff: content/renderer/renderer_blink_platform_impl.cc

Issue 800483002: Handle failures for GPU info collection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: InfoCollectionNone should be treated as info not available. Created 5 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/renderer_blink_platform_impl.cc
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index 974e60be0afcfec6cbfeb5f584ee35ce0dac2c12..83a6ece709ccb9fd2e3ac3db0120b0104f880078 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698