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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
113 } | 113 } |
114 statusMessage.append("."); | 114 statusMessage.append("."); |
115 } | 115 } |
116 canvas->dispatchEvent(WebGLContextEvent::create(EventTypeNames::webglcon textcreationerror, false, true, statusMessage)); | 116 canvas->dispatchEvent(WebGLContextEvent::create(EventTypeNames::webglcon textcreationerror, false, true, statusMessage)); |
117 return nullptr; | 117 return nullptr; |
118 } | 118 } |
119 | 119 |
120 OwnPtr<Extensions3DUtil> extensionsUtil = Extensions3DUtil::create(context.g et()); | 120 OwnPtr<Extensions3DUtil> extensionsUtil = Extensions3DUtil::create(context.g et()); |
121 if (!extensionsUtil) | 121 if (!extensionsUtil) |
122 return nullptr; | 122 return nullptr; |
123 if (extensionsUtil->supportsExtension("GL_EXT_debug_marker")) | 123 if (extensionsUtil->supportsExtension("GL_EXT_debug_marker")) { |
124 context->pushGroupMarkerEXT("WebGLRenderingContext"); | 124 String contextLabel("WebGLRenderingContext-"); |
125 contextLabel.append(String::format("%p", context.get())); | |
126 context->pushGroupMarkerEXT(contextLabel.utf8().data()); | |
vmiura
2015/01/30 22:08:48
The API expects ASCII encoding, so could you pleas
sivag
2015/02/02 06:34:36
Done.
| |
127 } | |
125 | 128 |
126 OwnPtrWillBeRawPtr<WebGLRenderingContext> renderingContext = adoptPtrWillBeN oop(new WebGLRenderingContext(canvas, context.release(), attributes)); | 129 OwnPtrWillBeRawPtr<WebGLRenderingContext> renderingContext = adoptPtrWillBeN oop(new WebGLRenderingContext(canvas, context.release(), attributes)); |
127 renderingContext->registerContextExtensions(); | 130 renderingContext->registerContextExtensions(); |
128 renderingContext->suspendIfNeeded(); | 131 renderingContext->suspendIfNeeded(); |
129 | 132 |
130 if (!renderingContext->drawingBuffer()) { | 133 if (!renderingContext->drawingBuffer()) { |
131 canvas->dispatchEvent(WebGLContextEvent::create(EventTypeNames::webglcon textcreationerror, false, true, "Could not create a WebGL context.")); | 134 canvas->dispatchEvent(WebGLContextEvent::create(EventTypeNames::webglcon textcreationerror, false, true, "Could not create a WebGL context.")); |
132 return nullptr; | 135 return nullptr; |
133 } | 136 } |
134 | 137 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
201 visitor->trace(m_webglDepthTexture); | 204 visitor->trace(m_webglDepthTexture); |
202 WebGLRenderingContextBase::trace(visitor); | 205 WebGLRenderingContextBase::trace(visitor); |
203 } | 206 } |
204 | 207 |
205 void WebGLRenderingContext::forceNextWebGLContextCreationToFail() | 208 void WebGLRenderingContext::forceNextWebGLContextCreationToFail() |
206 { | 209 { |
207 shouldFailContextCreationForTesting = true; | 210 shouldFailContextCreationForTesting = true; |
208 } | 211 } |
209 | 212 |
210 } // namespace blink | 213 } // namespace blink |
OLD | NEW |