OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
85 blink::WebGraphicsContext3D::Attributes wgc3dAttributes = toWebGraphicsConte xt3DAttributes(attributes, document.topDocument().url().string(), settings, 1); | 85 blink::WebGraphicsContext3D::Attributes wgc3dAttributes = toWebGraphicsConte xt3DAttributes(attributes, document.topDocument().url().string(), settings, 1); |
86 blink::WebGLInfo glInfo; | 86 blink::WebGLInfo glInfo; |
87 OwnPtr<blink::WebGraphicsContext3D> context = adoptPtr(blink::Platform::curr ent()->createOffscreenGraphicsContext3D(wgc3dAttributes, 0, &glInfo)); | 87 OwnPtr<blink::WebGraphicsContext3D> context = adoptPtr(blink::Platform::curr ent()->createOffscreenGraphicsContext3D(wgc3dAttributes, 0, &glInfo)); |
88 if (!context || shouldFailContextCreationForTesting) { | 88 if (!context || shouldFailContextCreationForTesting) { |
89 shouldFailContextCreationForTesting = false; | 89 shouldFailContextCreationForTesting = false; |
90 String statusMessage; | 90 String statusMessage; |
91 if (!glInfo.contextInfoCollectionFailure.isEmpty()) { | 91 if (!glInfo.contextInfoCollectionFailure.isEmpty()) { |
92 statusMessage.append("Could not create a WebGL context. "); | 92 statusMessage.append("Could not create a WebGL context. "); |
93 statusMessage.append(glInfo.contextInfoCollectionFailure); | 93 statusMessage.append(glInfo.contextInfoCollectionFailure); |
94 } else { | 94 } else { |
95 statusMessage.append("Could not create a WebGL context"); | 95 statusMessage.append("Could not create a WebGL context. "); |
96 statusMessage.append("VendorId = " + String::number(glInfo.vendorId) ); | |
97 statusMessage.append(", DriverId = " + String::number(glInfo.deviceI d)); | |
96 if (!glInfo.vendorInfo.isEmpty()) { | 98 if (!glInfo.vendorInfo.isEmpty()) { |
97 statusMessage.append(" VendorInfo = "); | 99 statusMessage.append(" VendorInfo = "); |
Ken Russell (switch to Gerrit)
2015/01/15 19:30:39
Please add a leading comma here to keep the format
sivag
2015/01/29 05:49:36
Done.
| |
98 statusMessage.append(glInfo.vendorInfo); | 100 statusMessage.append(glInfo.vendorInfo); |
99 } else { | 101 } else { |
100 statusMessage.append(" VendorInfo = Not Available"); | 102 statusMessage.append(" VendorInfo = Not Available"); |
101 } | 103 } |
102 if (!glInfo.rendererInfo.isEmpty()) { | 104 if (!glInfo.rendererInfo.isEmpty()) { |
103 statusMessage.append(", RendererInfo = "); | 105 statusMessage.append(", RendererInfo = "); |
104 statusMessage.append(glInfo.rendererInfo); | 106 statusMessage.append(glInfo.rendererInfo); |
105 } else { | 107 } else { |
106 statusMessage.append(", RendererInfo = Not Available"); | 108 statusMessage.append(", RendererInfo = Not Available"); |
107 } | 109 } |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
201 visitor->trace(m_webglDepthTexture); | 203 visitor->trace(m_webglDepthTexture); |
202 WebGLRenderingContextBase::trace(visitor); | 204 WebGLRenderingContextBase::trace(visitor); |
203 } | 205 } |
204 | 206 |
205 void WebGLRenderingContext::forceNextWebGLContextCreationToFail() | 207 void WebGLRenderingContext::forceNextWebGLContextCreationToFail() |
206 { | 208 { |
207 shouldFailContextCreationForTesting = true; | 209 shouldFailContextCreationForTesting = true; |
208 } | 210 } |
209 | 211 |
210 } // namespace blink | 212 } // namespace blink |
OLD | NEW |