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

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp

Issue 1384233003: Improve usefulness of webglcontextcreationerror statusMessage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
index 81cd3abc1cd0eca2654cb88649430961c3f67a18..9bfb6e7b6a1c8417286ac5840553b5a2ebc2e334 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -552,16 +552,18 @@ PassOwnPtr<WebGraphicsContext3D> WebGLRenderingContextBase::createWebGraphicsCon
if (!glInfo.contextInfoCollectionFailure.isEmpty()) {
statusMessage.append("Could not create a WebGL context. ");
statusMessage.append(glInfo.contextInfoCollectionFailure);
- String vendorId = String::number(glInfo.vendorId);
- String deviceId = String::number(glInfo.deviceId);
- if (vendorId.isEmpty())
+ if (glInfo.vendorId.isEmpty()) {
Ken Russell (switch to Gerrit) 2015/10/06 23:33:15 Could you please figure out some way to do the num
sivag 2015/10/12 14:36:59 When i tested on my linux machine, deviceid and ve
statusMessage.append("VendorId = Not Available");
- else
- statusMessage.append("VendorId = " + vendorId);
- if (deviceId.isEmpty())
+ } else {
+ statusMessage.append("VendorId = ");
+ statusMessage.append(glInfo.vendorId);
+ }
+ if (glInfo.deviceId.isEmpty()) {
statusMessage.append(", DeviceId = Not Available");
- else
- statusMessage.append(", DeviceId = " + deviceId);
+ } else {
+ statusMessage.append(", DeviceId = ");
+ statusMessage.append(glInfo.deviceId);
+ }
} else {
statusMessage.append("Could not create a WebGL context");
if (!glInfo.vendorInfo.isEmpty()) {
@@ -904,7 +906,7 @@ WebGLRenderingContextBase::WebGLRenderingContextBase(HTMLCanvasElement* passedCa
drawingBuffer()->bind(GL_FRAMEBUFFER);
setupFlags();
-
+
#define ADD_VALUES_TO_SET(set, values) \
for (size_t i = 0; i < arraysize(values); ++i) { \
set.insert(values[i]); \
« no previous file with comments | « content/renderer/renderer_blink_platform_impl.cc ('k') | third_party/WebKit/public/platform/WebGraphicsContext3D.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698