Changeset 83762 in webkit
- Timestamp:
- Apr 13, 2011 2:08:45 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r83751 r83762 1 2011-04-13 Zhenyao Mo <zmo@google.com> 2 3 Reviewed by Kenneth Russell. 4 5 Extension3D needs to provide a way to check if an extension is enabled 6 https://bugs.webkit.org/show_bug.cgi?id=58410 7 8 * html/canvas/WebGLRenderingContext.cpp: 9 (WebCore::WebGLRenderingContext::setupFlags): Use isEnabled() instead of supports(). 10 * platform/graphics/Extensions3D.h: Add isEnabled(). 11 * platform/graphics/chromium/Extensions3DChromium.h: Ditto. 12 * platform/graphics/opengl/Extensions3DOpenGL.cpp: Ditto. 13 (WebCore::Extensions3DOpenGL::isEnabled): 14 * platform/graphics/opengl/Extensions3DOpenGL.h: Ditto. 15 * platform/graphics/qt/Extensions3DQt.cpp: Ditto. 16 (WebCore::Extensions3DQt::isEnabled): 17 * platform/graphics/qt/Extensions3DQt.h: Ditto. 18 1 19 2011-04-13 Oliver Hunt <oliver@apple.com> 2 20 -
trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp
r83242 r83762 459 459 460 460 m_isGLES2Compliant = m_context->isGLES2Compliant(); 461 m_isErrorGeneratedOnOutOfBoundsAccesses = m_context->getExtensions()-> supports("GL_CHROMIUM_strict_attribs");462 m_isResourceSafe = m_context->getExtensions()-> supports("GL_CHROMIUM_resource_safe");461 m_isErrorGeneratedOnOutOfBoundsAccesses = m_context->getExtensions()->isEnabled("GL_CHROMIUM_strict_attribs"); 462 m_isResourceSafe = m_context->getExtensions()->isEnabled("GL_CHROMIUM_resource_safe"); 463 463 if (m_isGLES2Compliant) { 464 m_isGLES2NPOTStrict = !m_context->getExtensions()-> supports("GL_OES_texture_npot");465 m_isDepthStencilSupported = m_context->getExtensions()-> supports("GL_OES_packed_depth_stencil");464 m_isGLES2NPOTStrict = !m_context->getExtensions()->isEnabled("GL_OES_texture_npot"); 465 m_isDepthStencilSupported = m_context->getExtensions()->isEnabled("GL_OES_packed_depth_stencil"); 466 466 } else { 467 m_isGLES2NPOTStrict = !m_context->getExtensions()-> supports("GL_ARB_texture_non_power_of_two");468 m_isDepthStencilSupported = m_context->getExtensions()-> supports("GL_EXT_packed_depth_stencil");467 m_isGLES2NPOTStrict = !m_context->getExtensions()->isEnabled("GL_ARB_texture_non_power_of_two"); 468 m_isDepthStencilSupported = m_context->getExtensions()->isEnabled("GL_EXT_packed_depth_stencil"); 469 469 } 470 470 } -
trunk/Source/WebCore/platform/graphics/Extensions3D.h
r79011 r83762 67 67 virtual void ensureEnabled(const String&) = 0; 68 68 69 // Takes full name of extension: for example, "GL_EXT_texture_format_BGRA8888". 70 // Checks to see whether the given extension is actually enabled (see ensureEnabled). 71 // Has no other side-effects. 72 virtual bool isEnabled(const String&) = 0; 73 69 74 enum ExtensionsEnumType { 70 75 // GL_EXT_texture_format_BGRA8888 enums -
trunk/Source/WebCore/platform/graphics/chromium/Extensions3DChromium.h
r83552 r83762 44 44 virtual bool supports(const String&); 45 45 virtual void ensureEnabled(const String&); 46 virtual bool isEnabled(const String&); 46 47 virtual int getGraphicsResetStatusARB(); 47 48 virtual void blitFramebuffer(long srcX0, long srcY0, long srcX1, long srcY1, long dstX0, long dstY0, long dstX1, long dstY1, unsigned long mask, unsigned long filter); -
trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp
r82878 r83762 119 119 } 120 120 121 bool Extensions3DOpenGL::isEnabled(const String& name) 122 { 123 #if PLATFORM(MAC) 124 if (name == "GL_OES_standard_derivatives") { 125 ANGLEWebKitBridge& compiler = m_context->m_compiler; 126 return compiler.getResources().OES_standard_derivatives; 127 } 128 #endif 129 return supports(name); 130 } 131 121 132 int Extensions3DOpenGL::getGraphicsResetStatusARB() 122 133 { -
trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.h
r79011 r83762 42 42 virtual bool supports(const String&); 43 43 virtual void ensureEnabled(const String&); 44 virtual bool isEnabled(const String&); 44 45 virtual int getGraphicsResetStatusARB(); 45 46 virtual void blitFramebuffer(long srcX0, long srcY0, long srcX1, long srcY1, long dstX0, long dstY0, long dstX1, long dstY1, unsigned long mask, unsigned long filter); -
trunk/Source/WebCore/platform/graphics/qt/Extensions3DQt.cpp
r81069 r83762 53 53 } 54 54 55 bool Extensions3DQt::isEnabled(const String& name) 56 { 57 return supports(name); 58 } 59 55 60 int Extensions3DQt::getGraphicsResetStatusARB() 56 61 { -
trunk/Source/WebCore/platform/graphics/qt/Extensions3DQt.h
r79011 r83762 38 38 virtual bool supports(const String&); 39 39 virtual void ensureEnabled(const String&); 40 virtual bool isEnabled(const String&); 40 41 virtual int getGraphicsResetStatusARB(); 41 42 virtual void blitFramebuffer(long srcX0, long srcY0, long srcX1, long srcY1, long dstX0, long dstY0, long dstX1, long dstY1, unsigned long mask, unsigned long filter); -
trunk/Source/WebKit/chromium/ChangeLog
r83729 r83762 1 2011-04-13 Zhenyao Mo <zmo@google.com> 2 3 Reviewed by Kenneth Russell. 4 5 Extension3D needs to provide a way to check if an extension is enabled 6 https://bugs.webkit.org/show_bug.cgi?id=58410 7 8 Implement isEnabled() in chromium port. 9 10 * src/Extensions3DChromium.cpp: 11 (WebCore::Extensions3DChromium::isEnabled): 12 * src/GraphicsContext3DChromium.cpp: 13 (WebCore::GraphicsContext3DInternal::isExtensionEnabled): 14 * src/GraphicsContext3DInternal.h: 15 1 16 2011-04-13 Kinuko Yasuda <kinuko@chromium.org> 2 17 -
trunk/Source/WebKit/chromium/src/Extensions3DChromium.cpp
r83552 r83762 56 56 m_internal->ensureExtensionEnabled(name); 57 57 ASSERT(result); 58 } 59 60 bool Extensions3DChromium::isEnabled(const String& name) 61 { 62 return m_internal->isExtensionEnabled(name); 58 63 } 59 64 -
trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp
r83552 r83762 794 794 } 795 795 796 bool GraphicsContext3DInternal::isExtensionEnabled(const String& name) 797 { 798 initializeExtensions(); 799 String mappedName = mapExtensionName(name); 800 return m_enabledExtensions.contains(mappedName); 801 } 802 796 803 DELEGATE_TO_IMPL_4R(mapBufferSubDataCHROMIUM, GC3Denum, GC3Dsizeiptr, GC3Dsizei, GC3Denum, void*) 797 804 DELEGATE_TO_IMPL_1(unmapBufferSubDataCHROMIUM, const void*) -
trunk/Source/WebKit/chromium/src/GraphicsContext3DInternal.h
r83552 r83762 252 252 bool supportsExtension(const String& name); 253 253 bool ensureExtensionEnabled(const String& name); 254 bool isExtensionEnabled(const String& name); 254 255 255 256 // EXT_texture_format_BGRA8888
Note: See TracChangeset
for help on using the changeset viewer.