| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 canvas->dispatchEvent(WebGLContextEvent::create(EventTypeNames::webglcon
textcreationerror, false, true, "Could not create a WebGL context.")); | 97 canvas->dispatchEvent(WebGLContextEvent::create(EventTypeNames::webglcon
textcreationerror, false, true, "Could not create a WebGL context.")); |
| 98 return nullptr; | 98 return nullptr; |
| 99 } | 99 } |
| 100 | 100 |
| 101 return renderingContext.release(); | 101 return renderingContext.release(); |
| 102 } | 102 } |
| 103 | 103 |
| 104 WebGLRenderingContext::WebGLRenderingContext(HTMLCanvasElement* passedCanvas, Pa
ssOwnPtr<blink::WebGraphicsContext3D> context, WebGLContextAttributes* requested
Attributes) | 104 WebGLRenderingContext::WebGLRenderingContext(HTMLCanvasElement* passedCanvas, Pa
ssOwnPtr<blink::WebGraphicsContext3D> context, WebGLContextAttributes* requested
Attributes) |
| 105 : WebGLRenderingContextBase(passedCanvas, context, requestedAttributes) | 105 : WebGLRenderingContextBase(passedCanvas, context, requestedAttributes) |
| 106 { | 106 { |
| 107 ScriptWrappable::init(this); | |
| 108 } | 107 } |
| 109 | 108 |
| 110 WebGLRenderingContext::~WebGLRenderingContext() | 109 WebGLRenderingContext::~WebGLRenderingContext() |
| 111 { | 110 { |
| 112 } | 111 } |
| 113 | 112 |
| 114 void WebGLRenderingContext::registerContextExtensions() | 113 void WebGLRenderingContext::registerContextExtensions() |
| 115 { | 114 { |
| 116 // Register extensions. | 115 // Register extensions. |
| 117 static const char* const bothPrefixes[] = { "", "WEBKIT_", 0, }; | 116 static const char* const bothPrefixes[] = { "", "WEBKIT_", 0, }; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 visitor->trace(m_webglDrawBuffers); | 158 visitor->trace(m_webglDrawBuffers); |
| 160 visitor->trace(m_webglCompressedTextureATC); | 159 visitor->trace(m_webglCompressedTextureATC); |
| 161 visitor->trace(m_webglCompressedTextureETC1); | 160 visitor->trace(m_webglCompressedTextureETC1); |
| 162 visitor->trace(m_webglCompressedTexturePVRTC); | 161 visitor->trace(m_webglCompressedTexturePVRTC); |
| 163 visitor->trace(m_webglCompressedTextureS3TC); | 162 visitor->trace(m_webglCompressedTextureS3TC); |
| 164 visitor->trace(m_webglDepthTexture); | 163 visitor->trace(m_webglDepthTexture); |
| 165 WebGLRenderingContextBase::trace(visitor); | 164 WebGLRenderingContextBase::trace(visitor); |
| 166 } | 165 } |
| 167 | 166 |
| 168 } // namespace blink | 167 } // namespace blink |
| OLD | NEW |