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

Unified Diff: content/renderer/renderer_blink_platform_impl.cc

Issue 645613002: [WebGL-chromium] Return meaningful information in WebGL context creation error message (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move the main logic to argument with glinfo. Created 6 years, 2 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 | « content/renderer/renderer_blink_platform_impl.h ('k') | 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 242a5950a3c6cca3b1b844a75efd806d3955dfcf..0152cd177122dacc554fa2d4446570022ec67736 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -936,6 +936,14 @@ blink::WebGraphicsContext3D*
RendererBlinkPlatformImpl::createOffscreenGraphicsContext3D(
const blink::WebGraphicsContext3D::Attributes& attributes,
blink::WebGraphicsContext3D* share_context) {
+ return createOffscreenGraphicsContext3D(attributes, share_context, NULL);
+}
+
+blink::WebGraphicsContext3D*
+RendererBlinkPlatformImpl::createOffscreenGraphicsContext3D(
+ const blink::WebGraphicsContext3D::Attributes& attributes,
+ blink::WebGraphicsContext3D* share_context,
+ blink::WebGLInfo* gl_info) {
if (!RenderThreadImpl::current())
return NULL;
@@ -956,6 +964,15 @@ RendererBlinkPlatformImpl::createOffscreenGraphicsContext3D(
RenderThreadImpl::current()->EstablishGpuChannelSync(
CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE));
+ 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));
+ }
+
WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits limits;
bool lose_context_when_out_of_memory = false;
scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context(
« no previous file with comments | « content/renderer/renderer_blink_platform_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698