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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 canvas->dispatchEvent(WebGLContextEvent::create(EventTypeNames::webglcon
textcreationerror, false, true, "Could not create a WebGL context.")); | 105 canvas->dispatchEvent(WebGLContextEvent::create(EventTypeNames::webglcon
textcreationerror, false, true, "Could not create a WebGL context.")); |
106 return nullptr; | 106 return nullptr; |
107 } | 107 } |
108 | 108 |
109 return renderingContext.release(); | 109 return renderingContext.release(); |
110 } | 110 } |
111 | 111 |
112 WebGLRenderingContext::WebGLRenderingContext(HTMLCanvasElement* passedCanvas, Pa
ssOwnPtr<blink::WebGraphicsContext3D> context, WebGLContextAttributes* requested
Attributes) | 112 WebGLRenderingContext::WebGLRenderingContext(HTMLCanvasElement* passedCanvas, Pa
ssOwnPtr<blink::WebGraphicsContext3D> context, WebGLContextAttributes* requested
Attributes) |
113 : WebGLRenderingContextBase(passedCanvas, context, requestedAttributes) | 113 : WebGLRenderingContextBase(passedCanvas, context, requestedAttributes) |
114 { | 114 { |
115 ScriptWrappable::init(this); | |
116 } | 115 } |
117 | 116 |
118 WebGLRenderingContext::~WebGLRenderingContext() | 117 WebGLRenderingContext::~WebGLRenderingContext() |
119 { | 118 { |
120 } | 119 } |
121 | 120 |
122 void WebGLRenderingContext::registerContextExtensions() | 121 void WebGLRenderingContext::registerContextExtensions() |
123 { | 122 { |
124 // Register extensions. | 123 // Register extensions. |
125 static const char* const bothPrefixes[] = { "", "WEBKIT_", 0, }; | 124 static const char* const bothPrefixes[] = { "", "WEBKIT_", 0, }; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 visitor->trace(m_webglDrawBuffers); | 166 visitor->trace(m_webglDrawBuffers); |
168 visitor->trace(m_webglCompressedTextureATC); | 167 visitor->trace(m_webglCompressedTextureATC); |
169 visitor->trace(m_webglCompressedTextureETC1); | 168 visitor->trace(m_webglCompressedTextureETC1); |
170 visitor->trace(m_webglCompressedTexturePVRTC); | 169 visitor->trace(m_webglCompressedTexturePVRTC); |
171 visitor->trace(m_webglCompressedTextureS3TC); | 170 visitor->trace(m_webglCompressedTextureS3TC); |
172 visitor->trace(m_webglDepthTexture); | 171 visitor->trace(m_webglDepthTexture); |
173 WebGLRenderingContextBase::trace(visitor); | 172 WebGLRenderingContextBase::trace(visitor); |
174 } | 173 } |
175 | 174 |
176 } // namespace blink | 175 } // namespace blink |
OLD | NEW |