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

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: Dnt alter public api, created new api. 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..e477905ad6c846cef7b4a9c4abed9cec348424ec 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -929,7 +929,31 @@ bool RendererBlinkPlatformImpl::processMemorySizesInBytes(
blink::WebGraphicsContext3D*
RendererBlinkPlatformImpl::createOffscreenGraphicsContext3D(
const blink::WebGraphicsContext3D::Attributes& attributes) {
- return createOffscreenGraphicsContext3D(attributes, NULL);
+ blink::WebGLInfo gl_info;
piman 2014/10/27 19:43:47 Why create a WebGLInfo if we're going to discard i
sivag 2014/10/28 15:29:00 Done. Sorry i missed this.
+ return createOffscreenGraphicsContext3D(attributes, NULL, &gl_info);
+}
+
+blink::WebGraphicsContext3D*
+RendererBlinkPlatformImpl::createOffscreenGraphicsContext3D(
+ const blink::WebGraphicsContext3D::Attributes& attributes,
+ blink::WebGraphicsContext3D* share_context,
+ blink::WebGLInfo* gl_info) {
+
+ RenderThreadImpl* render_thread = RenderThreadImpl::current();
+ if (render_thread && gl_info) {
+ GpuChannelHost* gpu_channel_host = render_thread->GetGpuChannel();
piman 2014/10/27 19:43:47 This could be NULL, or a different channel than th
sivag 2014/10/28 15:29:00 Done.
+ if (gpu_channel_host) {
+ 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));
+ }
+ }
+
+ return createOffscreenGraphicsContext3D(attributes, share_context);
}
blink::WebGraphicsContext3D*
« 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