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

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: Created 6 years 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 9b5d79121e925bd0e21584aeeb210ec30418bee5..90ab6b8608ad78429ff887728927733260ceee2f 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -979,11 +979,33 @@ 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));
+ if (gpu_info.basic_info_state != gpu::kCollectInfoSuccess) {
no sievers 2014/12/12 18:41:26 I think you want to check |context_info_state| ins
Ken Russell (switch to Gerrit) 2014/12/12 22:43:05 Agreed; |context_info_state| is what should be che
sivag 2014/12/15 13:36:03 My intention here is to check, whether the GPUInfo
no sievers 2014/12/15 21:18:20 |basic_info_state| is for CollectBasicGraphicsInfo
+ switch (gpu_info.basic_info_state) {
+ // TODO (sikugu): On Mac gpu's this info is not collected, some tests
+ // fail.Need to check the root cause. Other references:crbug.com/222934
no sievers 2014/12/12 18:41:26 nit: space before "Need".. also just say TODO(siku
sivag 2014/12/15 13:36:03 Done.
+ case gpu::kCollectInfoNonFatalFailure:
+ gl_info->basicInfoCollectionFailure.assign(blink::WebString::fromUTF8(
no sievers 2014/12/12 18:41:26 Looks like kCollectInfoNonFatalFailure gets set wh
sivag 2014/12/15 13:36:03 GL_VENDOR, GL_RENDERER, GL_VERSION all these strin
Zhenyao Mo 2014/12/15 18:57:12 I agree with sievers. You should set the three st
sivag 2014/12/16 12:51:28 Done.
+ "GPUInfoCollectionFailure: Not able to fetch GPU info."));
+ break;
+ case gpu::kCollectInfoFatalFailure:
+ gl_info->contextInfoCollectionFailure.assign(
+ blink::WebString::fromUTF8(
+ "GPUInfoCollectionFailure: GPU initialization Failed. GPU "
+ "Info "
+ "not "
no sievers 2014/12/12 18:41:26 nit: weird formatting, can fit in one line
sivag 2014/12/15 13:36:03 Done.
+ "collected."));
+ break;
+ default:
+ NOTREACHED();
no sievers 2014/12/12 18:46:26 So we will be hitting this? Because you commented
Ken Russell (switch to Gerrit) 2014/12/12 22:43:05 I had the same question.
sivag 2014/12/15 13:36:03 It works fine with browser build. kCollectInfoNone
Zhenyao Mo 2014/12/15 18:57:12 layout tests run with content_shell, where this Gp
sivag 2014/12/16 12:51:28 Done.
+ };
+ } else {
+ 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));
+ }
}
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