Changeset 75271 in webkit
- Timestamp:
- Jan 7, 2011 1:41:37 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 14 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r75263 r75271 1 2011-01-05 Adrienne Walker <enne@google.com> 2 3 Reviewed by Kenneth Russell. 4 5 Add tests for WebGL's lost context events. 6 https://bugs.webkit.org/show_bug.cgi?id=51492 7 8 * fast/canvas/webgl/context-lost-expected.txt: Added. 9 * fast/canvas/webgl/context-lost-restored-expected.txt: Added. 10 * fast/canvas/webgl/context-lost-restored.html: Added. 11 * fast/canvas/webgl/context-lost.html: Added. 12 1 13 2011-01-07 Stephen White <senorblanco@chromium.org> 2 14 -
trunk/WebCore/CMakeLists.txt
r75169 r75271 304 304 html/canvas/WebGLTexture.idl 305 305 html/canvas/WebGLUniformLocation.idl 306 html/canvas/WebKitLoseContext.idl 306 307 307 308 inspector/InjectedScriptHost.idl -
trunk/WebCore/ChangeLog
r75270 r75271 1 2011-01-05 Adrienne Walker <enne@google.com> 2 3 Reviewed by Kenneth Russell. 4 5 Add WEBKIT_lose_context WebGL extension. 6 https://bugs.webkit.org/show_bug.cgi?id=51492 7 8 Tests: fast/canvas/webgl/context-lost-restored.html 9 fast/canvas/webgl/context-lost.html 10 11 * CMakeLists.txt: 12 * DerivedSources.make: 13 * GNUmakefile.am: 14 * WebCore.gypi: 15 * WebCore.pri: 16 * WebCore.pro: 17 * WebCore.xcodeproj/project.pbxproj: 18 * bindings/js/JSWebGLRenderingContextCustom.cpp: 19 (WebCore::toJS): 20 (WebCore::JSWebGLRenderingContext::getSupportedExtensions): 21 * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: 22 (WebCore::toV8Object): 23 (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallback): 24 * html/canvas/WebGLExtension.h: 25 * html/canvas/WebGLRenderingContext.cpp: 26 (WebCore::WebGLRenderingContext::WebGLRenderingContextRestoreTimer::fired): 27 (WebCore::WebGLRenderingContext::getExtension): 28 (WebCore::WebGLRenderingContext::getSupportedExtensions): 29 (WebCore::WebGLRenderingContext::forceLostContext): 30 (WebCore::WebGLRenderingContext::onLostContext): 31 (WebCore::WebGLRenderingContext::getNumberOfExtensions): 32 (WebCore::WebGLRenderingContext::getExtensionNumber): 33 * html/canvas/WebGLRenderingContext.h: 34 * html/canvas/WebKitLoseContext.cpp: Copied from WebCore/html/canvas/WebGLExtension.h. 35 (WebCore::WebKitLoseContext::WebKitLoseContext): 36 (WebCore::WebKitLoseContext::~WebKitLoseContext): 37 (WebCore::WebKitLoseContext::getName): 38 (WebCore::WebKitLoseContext::create): 39 (WebCore::WebKitLoseContext::loseContext): 40 * html/canvas/WebKitLoseContext.h: Copied from WebCore/html/canvas/WebGLExtension.h. 41 * html/canvas/WebKitLoseContext.idl: Copied from WebCore/html/canvas/WebGLExtension.h. 42 1 43 2011-01-07 Chris Marrin <cmarrin@apple.com> 2 44 -
trunk/WebCore/DerivedSources.make
r73806 r75271 509 509 WebKitCSSMatrix \ 510 510 WebKitCSSTransformValue \ 511 WebKitLoseContext \ 511 512 WebKitPoint \ 512 513 WebKitTransitionEvent \ -
trunk/WebCore/GNUmakefile.am
r75209 r75271 595 595 DerivedSources/WebCore/JSWebKitCSSTransformValue.cpp \ 596 596 DerivedSources/WebCore/JSWebKitCSSTransformValue.h \ 597 DerivedSources/WebCore/JSWebKitLoseContext.cpp \ 598 DerivedSources/WebCore/JSWebKitLoseContext.h \ 597 599 DerivedSources/WebCore/JSWebKitPoint.cpp \ 598 600 DerivedSources/WebCore/JSWebKitPoint.h \ … … 1572 1574 WebCore/html/canvas/OESTextureFloat.cpp \ 1573 1575 WebCore/html/canvas/OESTextureFloat.h \ 1576 WebCore/html/canvas/WebKitLoseContext.cpp \ 1577 WebCore/html/canvas/WebKitLoseContext.h \ 1574 1578 WebCore/html/canvas/Uint16Array.cpp \ 1575 1579 WebCore/html/canvas/Uint16Array.h \ -
trunk/WebCore/WebCore.gypi
r75169 r75271 229 229 'html/canvas/WebGLTexture.idl', 230 230 'html/canvas/WebGLUniformLocation.idl', 231 'html/canvas/WebKitLoseContext.idl', 231 232 'inspector/InjectedScriptHost.idl', 232 233 'inspector/InspectorFrontendHost.idl', … … 1949 1950 'html/canvas/WebGLUniformLocation.cpp', 1950 1951 'html/canvas/WebGLUniformLocation.h', 1952 'html/canvas/WebKitLoseContext.cpp', 1953 'html/canvas/WebKitLoseContext.h', 1951 1954 'html/parser/CSSPreloadScanner.cpp', 1952 1955 'html/parser/CSSPreloadScanner.h', -
trunk/WebCore/WebCore.pri
r74115 r75271 205 205 html/canvas/WebGLTexture.idl \ 206 206 html/canvas/WebGLUniformLocation.idl \ 207 html/canvas/WebKitLoseContext.idl \ 207 208 html/canvas/Uint8Array.idl \ 208 209 html/canvas/Uint32Array.idl \ -
trunk/WebCore/WebCore.pro
r75169 r75271 3798 3798 html/canvas/WebGLTexture.h \ 3799 3799 html/canvas/WebGLUniformLocation.h \ 3800 html/canvas/WebKitLoseContext.h \ 3800 3801 platform/graphics/Extensions3D.h \ 3801 3802 platform/graphics/GraphicsContext3D.h \ … … 3821 3822 html/canvas/WebGLTexture.cpp \ 3822 3823 html/canvas/WebGLUniformLocation.cpp \ 3824 html/canvas/WebKitLoseContext.cpp \ 3823 3825 platform/graphics/GraphicsContext3D.cpp \ 3824 3826 platform/graphics/qt/Extensions3DQt.cpp \ -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r75262 r75271 2960 2960 93F19B1608245E59001E9ABC /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8216299029F4FB501000131 /* JavaScriptCore.framework */; }; 2961 2961 93F19B1708245E59001E9ABC /* libicucore.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 93F1D31A0558CC5C00821BC0 /* libicucore.dylib */; }; 2962 93F1D5BA12D532C400832BEC /* WebKitLoseContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93F1D5B712D532C400832BEC /* WebKitLoseContext.cpp */; }; 2963 93F1D5BB12D532C400832BEC /* WebKitLoseContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 93F1D5B812D532C400832BEC /* WebKitLoseContext.h */; }; 2964 93F1D5C012D5335600832BEC /* JSWebKitLoseContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93F1D5BE12D5335600832BEC /* JSWebKitLoseContext.cpp */; }; 2965 93F1D5C112D5335600832BEC /* JSWebKitLoseContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 93F1D5BF12D5335600832BEC /* JSWebKitLoseContext.h */; }; 2962 2966 93F6F1ED127F70B10055CB06 /* WebGLContextEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93F6F1EA127F70B10055CB06 /* WebGLContextEvent.cpp */; }; 2963 2967 93F6F1EE127F70B10055CB06 /* WebGLContextEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 93F6F1EB127F70B10055CB06 /* WebGLContextEvent.h */; }; … … 7926 7930 6EBF0E7412A9868800DB1709 /* JSOESTextureFloat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSOESTextureFloat.cpp; sourceTree = "<group>"; }; 7927 7931 6EBF0E7512A9868800DB1709 /* JSOESTextureFloat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSOESTextureFloat.h; sourceTree = "<group>"; }; 7932 93F1D5BE12D5335600832BEC /* JSWebKitLoseContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebKitLoseContext.cpp; path = JSWebKitLoseContext.cpp; sourceTree = "<group>"; }; 7933 93F1D5BF12D5335600832BEC /* JSWebKitLoseContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWebKitLoseContext.h; path = JSWebKitLoseContext.h; sourceTree = "<group>"; }; 7928 7934 6EE8A77010F803F3005A4A24 /* JSWebGLContextAttributes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGLContextAttributes.cpp; sourceTree = "<group>"; }; 7929 7935 6EE8A77110F803F3005A4A24 /* JSWebGLContextAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGLContextAttributes.h; sourceTree = "<group>"; }; … … 9296 9302 93F19B1A08245E5A001E9ABC /* WebCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = WebCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 9297 9303 93F1D31A0558CC5C00821BC0 /* libicucore.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libicucore.dylib; path = /usr/lib/libicucore.dylib; sourceTree = "<absolute>"; }; 9304 93F1D5B712D532C400832BEC /* WebKitLoseContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebKitLoseContext.cpp; path = canvas/WebKitLoseContext.cpp; sourceTree = "<group>"; }; 9305 93F1D5B812D532C400832BEC /* WebKitLoseContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebKitLoseContext.h; path = canvas/WebKitLoseContext.h; sourceTree = "<group>"; }; 9306 93F1D5B912D532C400832BEC /* WebKitLoseContext.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = WebKitLoseContext.idl; path = canvas/WebKitLoseContext.idl; sourceTree = "<group>"; }; 9298 9307 93F6F1EA127F70B10055CB06 /* WebGLContextEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebGLContextEvent.cpp; path = canvas/WebGLContextEvent.cpp; sourceTree = "<group>"; }; 9299 9308 93F6F1EB127F70B10055CB06 /* WebGLContextEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGLContextEvent.h; path = canvas/WebGLContextEvent.h; sourceTree = "<group>"; }; … … 13089 13098 isa = PBXGroup; 13090 13099 children = ( 13100 93F1D5B712D532C400832BEC /* WebKitLoseContext.cpp */, 13101 93F1D5B812D532C400832BEC /* WebKitLoseContext.h */, 13102 93F1D5B912D532C400832BEC /* WebKitLoseContext.idl */, 13091 13103 49EECDCA10503C2300099FAB /* ArrayBuffer.cpp */, 13092 13104 49EECDCB10503C2300099FAB /* ArrayBuffer.h */, … … 15832 15844 isa = PBXGroup; 15833 15845 children = ( 15846 93F1D5BE12D5335600832BEC /* JSWebKitLoseContext.cpp */, 15847 93F1D5BF12D5335600832BEC /* JSWebKitLoseContext.h */, 15834 15848 49EECEF2105070C400099FAB /* JSArrayBuffer.cpp */, 15835 15849 49EECEF3105070C400099FAB /* JSArrayBuffer.h */, … … 22277 22291 7EE6847012D26E3800E79415 /* ResourceResponse.h in Headers */, 22278 22292 493E5E0912D6420500020081 /* PlatformCALayerClient.h in Headers */, 22293 93F1D5BB12D532C400832BEC /* WebKitLoseContext.h in Headers */, 22294 93F1D5C112D5335600832BEC /* JSWebKitLoseContext.h in Headers */, 22279 22295 ); 22280 22296 runOnlyForDeploymentPostprocessing = 0; … … 24959 24975 7EE6847112D26E3800E79415 /* ResourceResponseCFNet.cpp in Sources */, 24960 24976 7EE6847512D26E7000E79415 /* ResourceLoaderCFNet.cpp in Sources */, 24977 93F1D5BA12D532C400832BEC /* WebKitLoseContext.cpp in Sources */, 24978 93F1D5C012D5335600832BEC /* JSWebKitLoseContext.cpp in Sources */, 24961 24979 ); 24962 24980 runOnlyForDeploymentPostprocessing = 0; -
trunk/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp
r73806 r75271 30 30 #include "JSWebGLRenderingContext.h" 31 31 32 #include "WebKitLoseContext.h" 32 33 #include "ExceptionCode.h" 33 34 #include "HTMLCanvasElement.h" 34 35 #include "HTMLImageElement.h" 36 #include "JSWebKitLoseContext.h" 35 37 #include "JSHTMLCanvasElement.h" 36 38 #include "JSHTMLImageElement.h" … … 170 172 return jsNull(); 171 173 switch (extension->getName()) { 174 case WebGLExtension::WebKitLoseContextName: 175 return toJS(exec, globalObject, static_cast<WebKitLoseContext*>(extension)); 172 176 case WebGLExtension::OESTextureFloatName: 173 177 return toJS(exec, globalObject, static_cast<OESTextureFloat*>(extension)); … … 321 325 { 322 326 WebGLRenderingContext* context = static_cast<WebGLRenderingContext*>(impl()); 327 if (context->isContextLost()) 328 return jsNull(); 323 329 Vector<String> value = context->getSupportedExtensions(); 324 330 MarkedArgumentBuffer list; -
trunk/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp
r73806 r75271 36 36 37 37 #include "ExceptionCode.h" 38 39 38 #include "NotImplemented.h" 40 41 #include <wtf/FastMalloc.h> 42 39 #include "V8ArrayBufferView.h" 43 40 #include "V8Binding.h" 44 41 #include "V8BindingMacros.h" 45 #include "V8ArrayBufferView.h" 46 #include "V8WebGLBuffer.h" 47 #include "V8Int8Array.h" 42 #include "V8WebKitLoseContext.h" 48 43 #include "V8Float32Array.h" 49 #include "V8WebGLFramebuffer.h"50 #include "V8Int32Array.h"51 #include "V8WebGLProgram.h"52 #include "V8WebGLRenderbuffer.h"53 #include "V8WebGLShader.h"54 #include "V8Int16Array.h"55 #include "V8WebGLTexture.h"56 #include "V8WebGLUniformLocation.h"57 #include "V8Uint8Array.h"58 #include "V8Uint32Array.h"59 #include "V8Uint16Array.h"60 44 #include "V8HTMLCanvasElement.h" 61 45 #include "V8HTMLImageElement.h" 62 46 #include "V8HTMLVideoElement.h" 63 47 #include "V8ImageData.h" 48 #include "V8Int16Array.h" 49 #include "V8Int32Array.h" 50 #include "V8Int8Array.h" 64 51 #include "V8OESTextureFloat.h" 65 52 #include "V8Proxy.h" 53 #include "V8Uint16Array.h" 54 #include "V8Uint32Array.h" 55 #include "V8Uint8Array.h" 56 #include "V8WebGLBuffer.h" 57 #include "V8WebGLFramebuffer.h" 58 #include "V8WebGLProgram.h" 59 #include "V8WebGLRenderbuffer.h" 60 #include "V8WebGLShader.h" 61 #include "V8WebGLTexture.h" 62 #include "V8WebGLUniformLocation.h" 66 63 #include "WebGLRenderingContext.h" 64 #include <wtf/FastMalloc.h> 67 65 68 66 namespace WebCore { … … 160 158 v8::Handle<v8::Value> extensionObject; 161 159 switch (extension->getName()) { 160 case WebGLExtension::WebKitLoseContextName: 161 extensionObject = toV8(static_cast<WebKitLoseContext*>(extension)); 162 break; 162 163 case WebGLExtension::OESTextureFloatName: 163 164 extensionObject = toV8(static_cast<OESTextureFloat*>(extension)); … … 376 377 INC_STATS("DOM.WebGLRenderingContext.getSupportedExtensionsCallback()"); 377 378 WebGLRenderingContext* imp = V8WebGLRenderingContext::toNative(args.Holder()); 379 if (imp->isContextLost()) 380 return v8::Null(); 381 378 382 Vector<String> value = imp->getSupportedExtensions(); 379 383 v8::Local<v8::Array> array = v8::Array::New(value.size()); -
trunk/WebCore/html/canvas/WebGLExtension.h
r73806 r75271 35 35 // Extension names are needed to properly wrap instances in JavaScript objects. 36 36 enum ExtensionName { 37 OESTextureFloatName 37 WebKitLoseContextName, 38 OESTextureFloatName, 38 39 }; 39 40 -
trunk/WebCore/html/canvas/WebGLRenderingContext.cpp
r75254 r75271 33 33 #include "CanvasPixelArray.h" 34 34 #include "CheckedInt.h" 35 #include "WebKitLoseContext.h" 35 36 #include "Console.h" 36 37 #include "DOMWindow.h" … … 138 139 { 139 140 // Timer is started when m_contextLost is false. It will first call 140 // loseContext, which will set m_contextLost to true. Then it will keep141 // onLostContext, which will set m_contextLost to true. Then it will keep 141 142 // calling restoreContext and reschedule itself until m_contextLost is back 142 143 // to false. 143 144 if (!m_context->m_contextLost) { 144 m_context-> loseContext();145 m_context->onLostContext(); 145 146 startOneShot(secondsBetweenRestoreAttempts); 146 147 } else { … … 1574 1575 WebGLExtension* WebGLRenderingContext::getExtension(const String& name) 1575 1576 { 1577 if (isContextLost()) 1578 return 0; 1579 1576 1580 if (equalIgnoringCase(name, "OES_texture_float") 1577 1581 && m_context->getExtensions()->supports("GL_OES_texture_float")) { … … 1581 1585 } 1582 1586 return m_oesTextureFloat.get(); 1587 } else if (equalIgnoringCase(name, "WEBKIT_lose_context")) { 1588 if (!m_webkitLoseContext) 1589 m_webkitLoseContext = WebKitLoseContext::create(this); 1590 return m_webkitLoseContext.get(); 1583 1591 } 1584 1592 … … 1986 1994 if (m_context->getExtensions()->supports("GL_OES_texture_float")) 1987 1995 result.append("OES_texture_float"); 1996 result.append("WEBKIT_lose_context"); 1988 1997 return result; 1989 1998 } … … 3459 3468 } 3460 3469 3461 void WebGLRenderingContext::loseContext() 3470 void WebGLRenderingContext::forceLostContext() 3471 { 3472 if (isContextLost()) { 3473 m_context->synthesizeGLError(GraphicsContext3D::INVALID_OPERATION); 3474 return; 3475 } 3476 3477 m_restoreTimer.startOneShot(0); 3478 } 3479 3480 void WebGLRenderingContext::onLostContext() 3462 3481 { 3463 3482 m_contextLost = true; … … 4346 4365 int WebGLRenderingContext::getNumberOfExtensions() 4347 4366 { 4348 return (m_ oesTextureFloat ? 1 : 0);4367 return (m_webkitLoseContext ? 1 : 0) + (m_oesTextureFloat ? 1 : 0); 4349 4368 } 4350 4369 4351 4370 WebGLExtension* WebGLRenderingContext::getExtensionNumber(int i) 4352 4371 { 4372 if (m_webkitLoseContext) { 4373 if (!i) 4374 return m_webkitLoseContext.get(); 4375 --i; 4376 } 4353 4377 if (m_oesTextureFloat) { 4354 4378 if (!i) -
trunk/WebCore/html/canvas/WebGLRenderingContext.h
r75252 r75271 52 52 class WebGLTexture; 53 53 class WebGLUniformLocation; 54 class WebKitLoseContext; 54 55 class HTMLImageElement; 55 56 class HTMLVideoElement; … … 285 286 void viewport(long x, long y, long width, long height); 286 287 287 void loseContext(); 288 void forceLostContext(); 289 void onLostContext(); 288 290 void restoreContext(); 289 291 … … 469 471 // Enabled extension objects. 470 472 RefPtr<OESTextureFloat> m_oesTextureFloat; 473 RefPtr<WebKitLoseContext> m_webkitLoseContext; 471 474 472 475 // Helpers for getParameter and others -
trunk/WebCore/html/canvas/WebKitLoseContext.cpp
r75270 r75271 24 24 */ 25 25 26 #ifndef WebGLExtension_h 27 #define WebGLExtension_h 26 #include "config.h" 28 27 29 #include <wtf/RefCounted.h> 28 #if ENABLE(3D_CANVAS) 29 30 #include "WebKitLoseContext.h" 31 32 #include "WebGLRenderingContext.h" 30 33 31 34 namespace WebCore { 32 35 33 class WebGLExtension : public RefCounted<WebGLExtension> { 34 public: 35 // Extension names are needed to properly wrap instances in JavaScript objects. 36 enum ExtensionName { 37 OESTextureFloatName 38 }; 36 WebKitLoseContext::WebKitLoseContext(WebGLRenderingContext* context) 37 : WebGLExtension() 38 , m_context(context) 39 { 40 } 39 41 40 virtual ~WebGLExtension(); 41 virtual ExtensionName getName() const = 0; 42 WebKitLoseContext::~WebKitLoseContext() 43 { 44 } 42 45 43 protected: 44 WebGLExtension(); 45 }; 46 WebGLExtension::ExtensionName WebKitLoseContext::getName() const 47 { 48 return WebKitLoseContextName; 49 } 50 51 PassRefPtr<WebKitLoseContext> WebKitLoseContext::create(WebGLRenderingContext* context) 52 { 53 return adoptRef(new WebKitLoseContext(context)); 54 } 55 56 void WebKitLoseContext::loseContext() 57 { 58 m_context->forceLostContext(); 59 } 46 60 47 61 } // namespace WebCore 48 62 49 #endif // WebGLExtension_h63 #endif // ENABLE(3D_CANVAS) -
trunk/WebCore/html/canvas/WebKitLoseContext.h
r75270 r75271 24 24 */ 25 25 26 #ifndef Web GLExtension_h27 #define Web GLExtension_h26 #ifndef WebKitLoseContext_h 27 #define WebKitLoseContext_h 28 28 29 #include "WebGLExtension.h" 30 #include <wtf/PassRefPtr.h> 29 31 #include <wtf/RefCounted.h> 30 32 31 33 namespace WebCore { 32 34 33 class WebGLExtension : public RefCounted<WebGLExtension> { 35 class WebGLRenderingContext; 36 37 class WebKitLoseContext : public WebGLExtension { 34 38 public: 35 // Extension names are needed to properly wrap instances in JavaScript objects. 36 enum ExtensionName { 37 OESTextureFloatName 38 }; 39 static PassRefPtr<WebKitLoseContext> create(WebGLRenderingContext*); 39 40 40 virtual ~Web GLExtension();41 virtual ExtensionName getName() const = 0;41 virtual ~WebKitLoseContext(); 42 virtual ExtensionName getName() const; 42 43 43 protected: 44 WebGLExtension(); 44 void loseContext(); 45 46 private: 47 WebKitLoseContext(WebGLRenderingContext*); 48 49 WebGLRenderingContext* m_context; 45 50 }; 46 51 47 52 } // namespace WebCore 48 53 49 #endif // Web GLExtension_h54 #endif // WebKitLoseContext_h -
trunk/WebCore/html/canvas/WebKitLoseContext.idl
r75270 r75271 24 24 */ 25 25 26 #ifndef WebGLExtension_h 27 #define WebGLExtension_h 28 29 #include <wtf/RefCounted.h> 30 31 namespace WebCore { 32 33 class WebGLExtension : public RefCounted<WebGLExtension> { 34 public: 35 // Extension names are needed to properly wrap instances in JavaScript objects. 36 enum ExtensionName { 37 OESTextureFloatName 26 module html { 27 interface [Conditional=3D_CANVAS, OmitConstructor] WebKitLoseContext { 28 [StrictTypeChecking] void loseContext(); 38 29 }; 39 40 virtual ~WebGLExtension(); 41 virtual ExtensionName getName() const = 0; 42 43 protected: 44 WebGLExtension(); 45 }; 46 47 } // namespace WebCore 48 49 #endif // WebGLExtension_h 30 }
Note: See TracChangeset
for help on using the changeset viewer.