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

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: 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
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 3a0ccc35bad04b22350b102a4a29e1ed4577bd09..a26bd7204a5cea36fd2f86a79c2e6d1cb4254124 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -929,13 +929,15 @@ bool RendererBlinkPlatformImpl::processMemorySizesInBytes(
blink::WebGraphicsContext3D*
RendererBlinkPlatformImpl::createOffscreenGraphicsContext3D(
const blink::WebGraphicsContext3D::Attributes& attributes) {
- return createOffscreenGraphicsContext3D(attributes, NULL);
+ blink::WebGLInfo glInfo;
piman 2014/10/10 20:25:00 nit: gl_info
sivag 2014/10/27 13:34:52 Done.
+ return createOffscreenGraphicsContext3D(attributes, NULL, glInfo);
}
blink::WebGraphicsContext3D*
RendererBlinkPlatformImpl::createOffscreenGraphicsContext3D(
const blink::WebGraphicsContext3D::Attributes& attributes,
- blink::WebGraphicsContext3D* share_context) {
+ blink::WebGraphicsContext3D* share_context,
+ blink::WebGLInfo& glInfo) {
piman 2014/10/10 20:25:00 nit: gl_info
sivag 2014/10/27 13:34:52 Done.
if (!RenderThreadImpl::current())
return NULL;
@@ -956,6 +958,14 @@ RendererBlinkPlatformImpl::createOffscreenGraphicsContext3D(
RenderThreadImpl::current()->EstablishGpuChannelSync(
CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE));
+ const gpu::GPUInfo& gpu_info = gpu_channel_host->gpu_info();
+ glInfo.vendorInfo.assign(
+ blink::WebString::fromUTF8(gpu_info.gl_vendor));
+ glInfo.rendererInfo.assign(
+ blink::WebString::fromUTF8(gpu_info.gl_renderer));
+ glInfo.driverVersion.assign(
+ blink::WebString::fromUTF8(gpu_info.gl_version));
+
WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits limits;
bool lose_context_when_out_of_memory = false;
scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context(

Powered by Google App Engine
This is Rietveld 408576698