Changeset 107107 in webkit
- Timestamp:
- Feb 8, 2012 11:13:56 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 2 deleted
- 21 edited
- 1 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r107104 r107107 1 2012-02-08 Gregg Tavares <gman@chromium.org> 2 3 Implement new WEBGL compressed texture extensions 4 https://bugs.webkit.org/show_bug.cgi?id=77066 5 6 Reviewed by Kenneth Russell. 7 8 * fast/canvas/webgl/constants.html: 9 * fast/canvas/webgl/gl-get-calls-expected.txt: 10 * fast/canvas/webgl/gl-get-calls.html: 11 1 12 2012-02-08 Csaba Osztrogonác <ossy@webkit.org> 2 13 -
trunk/LayoutTests/fast/canvas/webgl/constants.html
r98407 r107107 195 195 /* TEXTURE_WRAP_T */ 196 196 197 NUM_COMPRESSED_TEXTURE_FORMATS : 0x86A2,198 197 COMPRESSED_TEXTURE_FORMATS : 0x86A3, 199 198 -
trunk/LayoutTests/fast/canvas/webgl/gl-get-calls-expected.txt
r65279 r107107 76 76 PASS context.getParameter(context.MAX_VERTEX_UNIFORM_VECTORS) >= 128 is true 77 77 PASS context.getParameter(context.MAX_VARYING_VECTORS) >= 8 is true 78 PASS context.getParameter(context. NUM_COMPRESSED_TEXTURE_FORMATS) is 078 PASS context.getParameter(context.COMPRESSED_TEXTURE_FORMATS) is [] 79 79 80 80 PASS successfullyParsed is true -
trunk/LayoutTests/fast/canvas/webgl/gl-get-calls.html
r98407 r107107 108 108 shouldBeTrue('context.getParameter(context.MAX_VERTEX_UNIFORM_VECTORS) >= 128'); 109 109 shouldBeTrue('context.getParameter(context.MAX_VARYING_VECTORS) >= 8'); 110 shouldBe('context.getParameter(context. NUM_COMPRESSED_TEXTURE_FORMATS)', '0');110 shouldBe('context.getParameter(context.COMPRESSED_TEXTURE_FORMATS)', '[]'); 111 111 } 112 112 -
trunk/Source/WebCore/CMakeLists.txt
r106953 r107107 2182 2182 ${THIRDPARTY_DIR}/ANGLE/src/compiler/VariableInfo.cpp 2183 2183 html/canvas/WebGLBuffer.cpp 2184 html/canvas/WebGLCompressedTexture s.cpp2184 html/canvas/WebGLCompressedTextureS3TC.cpp 2185 2185 html/canvas/WebGLContextAttributes.cpp 2186 2186 html/canvas/WebGLContextEvent.cpp … … 2215 2215 html/canvas/WebGLActiveInfo.idl 2216 2216 html/canvas/WebGLBuffer.idl 2217 html/canvas/WebGLCompressedTexture s.idl2217 html/canvas/WebGLCompressedTextureS3TC.idl 2218 2218 html/canvas/WebGLContextAttributes.idl 2219 2219 html/canvas/WebGLContextEvent.idl -
trunk/Source/WebCore/ChangeLog
r107106 r107107 1 2012-02-08 Gregg Tavares <gman@google.com> 2 3 Implement new WEBGL compressed texture extensions 4 https://bugs.webkit.org/show_bug.cgi?id=77066 5 6 This removes the old experimental compressed 7 texture extension and implements the first new 8 one. 9 10 A test is in the WebGL conformance tests in 11 extensions/webgl-compressed-texture-s3tc.html 12 and will be copied here in a future patch. 13 14 Reviewed by Kenneth Russell. 15 16 No new tests. Test coming in future patch. 17 18 * CMakeLists.txt: 19 * DerivedSources.make: 20 * GNUmakefile.list.am: 21 * Target.pri: 22 * WebCore.gypi: 23 * WebCore.xcodeproj/project.pbxproj: 24 * bindings/js/JSWebGLRenderingContextCustom.cpp: 25 (WebCore::toJS): 26 * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: 27 (WebCore::toV8Object): 28 * html/canvas/WebGLCompressedTextureS3TC.cpp: Added. 29 (WebCore): 30 (WebCore::WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC): 31 (WebCore::WebGLCompressedTextureS3TC::~WebGLCompressedTextureS3TC): 32 (WebCore::WebGLCompressedTextureS3TC::getName): 33 (WebCore::WebGLCompressedTextureS3TC::create): 34 (WebCore::WebGLCompressedTextureS3TC::supported): 35 * html/canvas/WebGLCompressedTextureS3TC.h: Copied from Source/WebCore/html/canvas/WebGLExtension.h. 36 (WebCore): 37 (WebGLCompressedTextureS3TC): 38 * html/canvas/WebGLCompressedTextureS3TC.idl: Renamed from Source/WebCore/html/canvas/WebGLCompressedTextures.idl. 39 * html/canvas/WebGLCompressedTextures.cpp: Removed. 40 * html/canvas/WebGLCompressedTextures.h: Removed. 41 * html/canvas/WebGLExtension.h: 42 * html/canvas/WebGLGetInfo.cpp: 43 (WebCore::WebGLGetInfo::WebGLGetInfo): 44 (WebCore): 45 (WebCore::WebGLGetInfo::getWebGLUnsignedIntArray): 46 * html/canvas/WebGLGetInfo.h: 47 * html/canvas/WebGLObject.cpp: 48 * html/canvas/WebGLRenderingContext.cpp: 49 (WebCore): 50 (WebCore::WebGLRenderingContext::addCompressedTextureFormat): 51 (WebCore::WebGLRenderingContext::compressedTexImage2D): 52 (WebCore::WebGLRenderingContext::compressedTexSubImage2D): 53 (WebCore::WebGLRenderingContext::getExtension): 54 (WebCore::WebGLRenderingContext::getParameter): 55 (WebCore::WebGLRenderingContext::getSupportedExtensions): 56 (WebCore::WebGLRenderingContext::validateCompressedTexFormat): 57 (WebCore::WebGLRenderingContext::validateCompressedTexFuncData): 58 (WebCore::WebGLRenderingContext::validateCompressedTexDimensions): 59 (WebCore::WebGLRenderingContext::validateCompressedTexSubDimensions): 60 * html/canvas/WebGLRenderingContext.h: 61 (WebCore): 62 (WebGLRenderingContext): 63 * html/canvas/WebGLRenderingContext.idl: 64 1 65 2012-02-08 Ilya Tikhonovsky <loislo@chromium.org> 2 66 -
trunk/Source/WebCore/DerivedSources.make
r107026 r107107 287 287 $(WebCore)/html/canvas/WebGLActiveInfo.idl \ 288 288 $(WebCore)/html/canvas/WebGLBuffer.idl \ 289 $(WebCore)/html/canvas/WebGLCompressedTexture s.idl \289 $(WebCore)/html/canvas/WebGLCompressedTextureS3TC.idl \ 290 290 $(WebCore)/html/canvas/WebGLContextAttributes.idl \ 291 291 $(WebCore)/html/canvas/WebGLContextEvent.idl \ -
trunk/Source/WebCore/DerivedSources.pri
r107026 r107107 223 223 $$PWD/html/canvas/WebGLActiveInfo.idl \ 224 224 $$PWD/html/canvas/WebGLBuffer.idl \ 225 $$PWD/html/canvas/WebGLCompressedTextureS3TC.idl \ 225 226 $$PWD/html/canvas/WebGLContextAttributes.idl \ 226 227 $$PWD/html/canvas/WebGLContextEvent.idl \ -
trunk/Source/WebCore/GNUmakefile.list.am
r107082 r107107 544 544 DerivedSources/WebCore/JSWebGLBuffer.cpp \ 545 545 DerivedSources/WebCore/JSWebGLBuffer.h \ 546 DerivedSources/WebCore/JSWebGLCompressedTextureS3TC.cpp \ 547 DerivedSources/WebCore/JSWebGLCompressedTextureS3TC.h \ 546 548 DerivedSources/WebCore/JSWebGLContextAttributes.cpp \ 547 549 DerivedSources/WebCore/JSWebGLContextAttributes.h \ … … 848 850 $(WebCore)/html/canvas/WebGLActiveInfo.idl \ 849 851 $(WebCore)/html/canvas/WebGLBuffer.idl \ 852 $(WebCore)/html/canvas/WebGLCompressedTextureS3TC.idl \ 850 853 $(WebCore)/html/canvas/WebGLContextAttributes.idl \ 851 854 $(WebCore)/html/canvas/WebGLContextEvent.idl \ … … 5615 5618 Source/WebCore/html/canvas/WebGLBuffer.cpp \ 5616 5619 Source/WebCore/html/canvas/WebGLBuffer.h \ 5617 Source/WebCore/html/canvas/WebGLCompressedTexture s.cpp \5618 Source/WebCore/html/canvas/WebGLCompressedTexture s.h \5620 Source/WebCore/html/canvas/WebGLCompressedTextureS3TC.cpp \ 5621 Source/WebCore/html/canvas/WebGLCompressedTextureS3TC.h \ 5619 5622 Source/WebCore/html/canvas/WebGLContextAttributes.cpp \ 5620 5623 Source/WebCore/html/canvas/WebGLContextAttributes.h \ -
trunk/Source/WebCore/Target.pri
r107082 r107107 3694 3694 html/canvas/WebGLActiveInfo.h \ 3695 3695 html/canvas/WebGLBuffer.h \ 3696 html/canvas/WebGLCompressedTexture s.h \3696 html/canvas/WebGLCompressedTextureS3TC.h \ 3697 3697 html/canvas/WebGLContextAttributes.h \ 3698 3698 html/canvas/WebGLContextEvent.h \ … … 3734 3734 html/canvas/WebGLObject.cpp \ 3735 3735 html/canvas/WebGLBuffer.cpp \ 3736 html/canvas/WebGLCompressedTexture s.cpp \3736 html/canvas/WebGLCompressedTextureS3TC.cpp \ 3737 3737 html/canvas/WebGLContextAttributes.cpp \ 3738 3738 html/canvas/WebGLContextEvent.cpp \ -
trunk/Source/WebCore/WebCore.gypi
r107082 r107107 961 961 'html/canvas/WebGLActiveInfo.idl', 962 962 'html/canvas/WebGLBuffer.idl', 963 'html/canvas/WebGLCompressedTexture s.idl',963 'html/canvas/WebGLCompressedTextureS3TC.idl', 964 964 'html/canvas/WebGLContextAttributes.idl', 965 965 'html/canvas/WebGLContextEvent.idl', … … 5442 5442 'html/canvas/WebGLBuffer.cpp', 5443 5443 'html/canvas/WebGLBuffer.h', 5444 'html/canvas/WebGLCompressedTexture s.cpp',5445 'html/canvas/WebGLCompressedTexture s.h',5444 'html/canvas/WebGLCompressedTextureS3TC.cpp', 5445 'html/canvas/WebGLCompressedTextureS3TC.h', 5446 5446 'html/canvas/WebGLContextAttributes.cpp', 5447 5447 'html/canvas/WebGLContextAttributes.h', … … 7855 7855 '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebGLBuffer.cpp', 7856 7856 '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebGLBuffer.h', 7857 '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebGLCompressedTextureS3TC.cpp', 7858 '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebGLCompressedTextureS3TC.h', 7857 7859 '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebGLContextAttributes.cpp', 7858 7860 '<(PRODUCT_DIR)/DerivedSources/WebCore/JSWebGLContextAttributes.h', -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r107082 r107107 1783 1783 6E21C6C01126338500A7BE02 /* GraphicsContext3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E21C6BF1126338500A7BE02 /* GraphicsContext3D.cpp */; }; 1784 1784 6E21C6C21126339900A7BE02 /* GraphicsContext3DCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E21C6C11126339900A7BE02 /* GraphicsContext3DCG.cpp */; }; 1785 6E3FAD3814733F4000E42306 /* JSWebGLCompressedTexture s.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E3FAD3614733F4000E42306 /* JSWebGLCompressedTextures.cpp */; };1786 6E3FAD3914733F4000E42306 /* JSWebGLCompressedTexture s.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3FAD3714733F4000E42306 /* JSWebGLCompressedTextures.h */; };1787 6E3FAE8E14733FDB00E42306 /* WebGLCompressedTexture s.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E3FAE8C14733FDB00E42306 /* WebGLCompressedTextures.cpp */; };1788 6E3FAE8F14733FDB00E42306 /* WebGLCompressedTexture s.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3FAE8D14733FDB00E42306 /* WebGLCompressedTextures.h */; };1785 6E3FAD3814733F4000E42306 /* JSWebGLCompressedTextureS3TC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E3FAD3614733F4000E42306 /* JSWebGLCompressedTextureS3TC.cpp */; }; 1786 6E3FAD3914733F4000E42306 /* JSWebGLCompressedTextureS3TC.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3FAD3714733F4000E42306 /* JSWebGLCompressedTextureS3TC.h */; }; 1787 6E3FAE8E14733FDB00E42306 /* WebGLCompressedTextureS3TC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E3FAE8C14733FDB00E42306 /* WebGLCompressedTextureS3TC.cpp */; }; 1788 6E3FAE8F14733FDB00E42306 /* WebGLCompressedTextureS3TC.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E3FAE8D14733FDB00E42306 /* WebGLCompressedTextureS3TC.h */; }; 1789 1789 6E47E66010B7944B00B186C8 /* WebGLGetInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E47E65E10B7944B00B186C8 /* WebGLGetInfo.cpp */; }; 1790 1790 6E47E66110B7944B00B186C8 /* WebGLGetInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E47E65F10B7944B00B186C8 /* WebGLGetInfo.h */; }; … … 8651 8651 6E21C6BF1126338500A7BE02 /* GraphicsContext3D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContext3D.cpp; sourceTree = "<group>"; }; 8652 8652 6E21C6C11126339900A7BE02 /* GraphicsContext3DCG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContext3DCG.cpp; sourceTree = "<group>"; }; 8653 6E3FAD3614733F4000E42306 /* JSWebGLCompressedTexture s.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGLCompressedTextures.cpp; sourceTree = "<group>"; };8654 6E3FAD3714733F4000E42306 /* JSWebGLCompressedTexture s.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGLCompressedTextures.h; sourceTree = "<group>"; };8655 6E3FAE8C14733FDB00E42306 /* WebGLCompressedTexture s.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebGLCompressedTextures.cpp; path = canvas/WebGLCompressedTextures.cpp; sourceTree = "<group>"; };8656 6E3FAE8D14733FDB00E42306 /* WebGLCompressedTexture s.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGLCompressedTextures.h; path = canvas/WebGLCompressedTextures.h; sourceTree = "<group>"; };8657 6E3FAE9014733FEA00E42306 /* WebGLCompressedTexture s.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = WebGLCompressedTextures.idl; path = canvas/WebGLCompressedTextures.idl; sourceTree = "<group>"; };8653 6E3FAD3614733F4000E42306 /* JSWebGLCompressedTextureS3TC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGLCompressedTextureS3TC.cpp; sourceTree = "<group>"; }; 8654 6E3FAD3714733F4000E42306 /* JSWebGLCompressedTextureS3TC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGLCompressedTextureS3TC.h; sourceTree = "<group>"; }; 8655 6E3FAE8C14733FDB00E42306 /* WebGLCompressedTextureS3TC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebGLCompressedTextureS3TC.cpp; path = canvas/WebGLCompressedTextureS3TC.cpp; sourceTree = "<group>"; }; 8656 6E3FAE8D14733FDB00E42306 /* WebGLCompressedTextureS3TC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGLCompressedTextureS3TC.h; path = canvas/WebGLCompressedTextureS3TC.h; sourceTree = "<group>"; }; 8657 6E3FAE9014733FEA00E42306 /* WebGLCompressedTextureS3TC.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = WebGLCompressedTextureS3TC.idl; path = canvas/WebGLCompressedTextureS3TC.idl; sourceTree = "<group>"; }; 8658 8658 6E47E65E10B7944B00B186C8 /* WebGLGetInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebGLGetInfo.cpp; path = canvas/WebGLGetInfo.cpp; sourceTree = "<group>"; }; 8659 8659 6E47E65F10B7944B00B186C8 /* WebGLGetInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGLGetInfo.h; path = canvas/WebGLGetInfo.h; sourceTree = "<group>"; }; … … 14482 14482 49C7B9A91042D32E0009D447 /* WebGLBuffer.h */, 14483 14483 49C7B9AA1042D32E0009D447 /* WebGLBuffer.idl */, 14484 6E3FAE8C14733FDB00E42306 /* WebGLCompressedTexture s.cpp */,14485 6E3FAE8D14733FDB00E42306 /* WebGLCompressedTexture s.h */,14486 6E3FAE9014733FEA00E42306 /* WebGLCompressedTexture s.idl */,14484 6E3FAE8C14733FDB00E42306 /* WebGLCompressedTextureS3TC.cpp */, 14485 6E3FAE8D14733FDB00E42306 /* WebGLCompressedTextureS3TC.h */, 14486 6E3FAE9014733FEA00E42306 /* WebGLCompressedTextureS3TC.idl */, 14487 14487 6E4E91A910F7FB3100A2779C /* WebGLContextAttributes.cpp */, 14488 14488 6E4E91AA10F7FB3100A2779C /* WebGLContextAttributes.h */, … … 17465 17465 49C7B9801042D2D30009D447 /* JSWebGLBuffer.cpp */, 17466 17466 49C7B9811042D2D30009D447 /* JSWebGLBuffer.h */, 17467 6E3FAD3614733F4000E42306 /* JSWebGLCompressedTexture s.cpp */,17468 6E3FAD3714733F4000E42306 /* JSWebGLCompressedTexture s.h */,17467 6E3FAD3614733F4000E42306 /* JSWebGLCompressedTextureS3TC.cpp */, 17468 6E3FAD3714733F4000E42306 /* JSWebGLCompressedTextureS3TC.h */, 17469 17469 6EE8A77010F803F3005A4A24 /* JSWebGLContextAttributes.cpp */, 17470 17470 6EE8A77110F803F3005A4A24 /* JSWebGLContextAttributes.h */, … … 22992 22992 A7D20F63107F406900A80392 /* JSWebGLActiveInfo.h in Headers */, 22993 22993 49C7B9941042D2D30009D447 /* JSWebGLBuffer.h in Headers */, 22994 6E3FAD3914733F4000E42306 /* JSWebGLCompressedTexture s.h in Headers */,22994 6E3FAD3914733F4000E42306 /* JSWebGLCompressedTextureS3TC.h in Headers */, 22995 22995 6EE8A77310F803F3005A4A24 /* JSWebGLContextAttributes.h in Headers */, 22996 22996 BC2CBF4E140F1ABD003879BE /* JSWebGLContextEvent.h in Headers */, … … 24019 24019 A7D20F6D107F438B00A80392 /* WebGLActiveInfo.h in Headers */, 24020 24020 49C7B9C91042D32F0009D447 /* WebGLBuffer.h in Headers */, 24021 6E3FAE8F14733FDB00E42306 /* WebGLCompressedTexture s.h in Headers */,24021 6E3FAE8F14733FDB00E42306 /* WebGLCompressedTextureS3TC.h in Headers */, 24022 24022 6E4E91AF10F7FB3100A2779C /* WebGLContextAttributes.h in Headers */, 24023 24023 93F6F1EE127F70B10055CB06 /* WebGLContextEvent.h in Headers */, … … 26136 26136 A7D20F62107F406900A80392 /* JSWebGLActiveInfo.cpp in Sources */, 26137 26137 49C7B9931042D2D30009D447 /* JSWebGLBuffer.cpp in Sources */, 26138 6E3FAD3814733F4000E42306 /* JSWebGLCompressedTexture s.cpp in Sources */,26138 6E3FAD3814733F4000E42306 /* JSWebGLCompressedTextureS3TC.cpp in Sources */, 26139 26139 6EE8A77210F803F3005A4A24 /* JSWebGLContextAttributes.cpp in Sources */, 26140 26140 BC2CBF7B140F1D58003879BE /* JSWebGLContextEvent.cpp in Sources */, … … 26969 26969 BC6DADFA0A19602B00E5CD14 /* WebFontCache.mm in Sources */, 26970 26970 49C7B9C81042D32F0009D447 /* WebGLBuffer.cpp in Sources */, 26971 6E3FAE8E14733FDB00E42306 /* WebGLCompressedTexture s.cpp in Sources */,26971 6E3FAE8E14733FDB00E42306 /* WebGLCompressedTextureS3TC.cpp in Sources */, 26972 26972 6E4E91AE10F7FB3100A2779C /* WebGLContextAttributes.cpp in Sources */, 26973 26973 93F6F1ED127F70B10055CB06 /* WebGLContextEvent.cpp in Sources */, -
trunk/Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp
r105698 r107107 41 41 #include "JSOESTextureFloat.h" 42 42 #include "JSOESVertexArrayObject.h" 43 #include "JSUint32Array.h" 43 44 #include "JSUint8Array.h" 44 45 #include "JSWebGLBuffer.h" 46 #include "JSWebGLCompressedTextureS3TC.h" 45 47 #include "JSWebGLFramebuffer.h" 46 48 #include "JSWebGLLoseContext.h" … … 57 59 #include "OESVertexArrayObject.h" 58 60 #include "WebGLBuffer.h" 59 #include "WebGLCompressedTexture s.h"61 #include "WebGLCompressedTextureS3TC.h" 60 62 #include "WebGLDebugRendererInfo.h" 61 63 #include "WebGLDebugShaders.h" … … 72 74 #include <wtf/Float32Array.h> 73 75 #include <wtf/Int32Array.h> 76 #include <wtf/Uint32Array.h> 74 77 75 78 #if ENABLE(VIDEO) … … 122 125 case WebGLGetInfo::kTypeWebGLUnsignedByteArray: 123 126 return toJS(exec, globalObject, info.getWebGLUnsignedByteArray()); 127 case WebGLGetInfo::kTypeWebGLUnsignedIntArray: 128 return toJS(exec, globalObject, info.getWebGLUnsignedIntArray()); 124 129 case WebGLGetInfo::kTypeWebGLVertexArrayObjectOES: 125 130 return toJS(exec, globalObject, info.getWebGLVertexArrayObjectOES()); … … 194 199 case WebGLExtension::WebGLDebugShadersName: 195 200 return toJS(exec, globalObject, static_cast<WebGLDebugShaders*>(extension)); 196 case WebGLExtension::WebKitWebGLCompressedTexture sName:197 return toJS(exec, globalObject, static_cast<WebGLCompressedTexture s*>(extension));201 case WebGLExtension::WebKitWebGLCompressedTextureS3TCName: 202 return toJS(exec, globalObject, static_cast<WebGLCompressedTextureS3TC*>(extension)); 198 203 } 199 204 ASSERT_NOT_REACHED(); -
trunk/Source/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp
r102973 r107107 56 56 #include "V8Uint8Array.h" 57 57 #include "V8WebGLBuffer.h" 58 #include "V8WebGLCompressedTexture s.h"58 #include "V8WebGLCompressedTextureS3TC.h" 59 59 #include "V8WebGLDebugRendererInfo.h" 60 60 #include "V8WebGLDebugShaders.h" … … 155 155 case WebGLGetInfo::kTypeWebGLUnsignedByteArray: 156 156 return toV8(info.getWebGLUnsignedByteArray()); 157 case WebGLGetInfo::kTypeWebGLUnsignedIntArray: 158 return toV8(info.getWebGLUnsignedIntArray()); 157 159 case WebGLGetInfo::kTypeWebGLVertexArrayObjectOES: 158 160 return toV8(info.getWebGLVertexArrayObjectOES()); … … 194 196 referenceName = "webGLDebugShadersName"; 195 197 break; 196 case WebGLExtension::WebKitWebGLCompressedTexture sName:197 extensionObject = toV8(static_cast<WebGLCompressedTexture s*>(extension));198 referenceName = "webKitWebGLCompressedTexture sName";198 case WebGLExtension::WebKitWebGLCompressedTextureS3TCName: 199 extensionObject = toV8(static_cast<WebGLCompressedTextureS3TC*>(extension)); 200 referenceName = "webKitWebGLCompressedTextureS3TCName"; 199 201 break; 200 202 } -
trunk/Source/WebCore/html/canvas/WebGLCompressedTextureS3TC.h
r107106 r107107 1 1 /* 2 * Copyright (C) 201 0Google Inc. All rights reserved.2 * Copyright (C) 2012 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #ifndef WebGL Extension_h27 #define WebGL Extension_h26 #ifndef WebGLCompressedTextureS3TC_h 27 #define WebGLCompressedTextureS3TC_h 28 28 29 #include "WebGLRenderingContext.h" 29 #include "ExceptionCode.h" 30 #include "WebGLExtension.h" 31 #include <wtf/PassOwnPtr.h> 30 32 31 33 namespace WebCore { 32 34 33 class WebGLExtension { 35 class WebGLTexture; 36 37 class WebGLCompressedTextureS3TC : public WebGLExtension { 34 38 public: 35 // Extension names are needed to properly wrap instances in JavaScript objects. 36 enum ExtensionName { 37 WebKitWebGLLoseContextName, // WEBKIT_ prefix until extension is official 38 OESTextureFloatName, 39 OESStandardDerivativesName, 40 OESVertexArrayObjectName, 41 WebGLDebugRendererInfoName, 42 WebGLDebugShadersName, 43 WebKitWebGLCompressedTexturesName, // WEBKIT_ prefix until extension is official 44 }; 39 static PassOwnPtr<WebGLCompressedTextureS3TC> create(WebGLRenderingContext*); 45 40 46 void ref() { m_context->ref(); } 47 void deref() { m_context->deref(); } 48 WebGLRenderingContext* context() { return m_context; } 41 static bool supported(WebGLRenderingContext*); 49 42 50 virtual ~WebGL Extension();51 virtual ExtensionName getName() const = 0;43 virtual ~WebGLCompressedTextureS3TC(); 44 virtual ExtensionName getName() const; 52 45 53 protected: 54 WebGLExtension(WebGLRenderingContext*); 55 WebGLRenderingContext* m_context; 46 private: 47 WebGLCompressedTextureS3TC(WebGLRenderingContext*); 56 48 }; 57 49 58 50 } // namespace WebCore 59 51 60 #endif // WebGL Extension_h52 #endif // WebGLCompressedTextureS3TC_h -
trunk/Source/WebCore/html/canvas/WebGLCompressedTextureS3TC.idl
r107106 r107107 1 1 /* 2 * Copyright (C) 201 1Google Inc. All rights reserved.2 * Copyright (C) 2012 Google Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 30 30 OmitConstructor, 31 31 DoNotCheckConstants 32 ] WebGLCompressedTexture s{32 ] WebGLCompressedTextureS3TC { 33 33 /* Compressed Texture Formats */ 34 34 const unsigned int COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0; 35 35 const unsigned int COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1; 36 const unsigned int COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2; 36 37 const unsigned int COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3; 37 const unsigned int ETC1_RGB8_OES = 0x8D64;38 const unsigned int COMPRESSED_RGB_PVRTC_4BPPV1_IMG = 0x8C00;39 const unsigned int COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 0x8C02;40 41 [StrictTypeChecking] void compressedTexImage2D(in unsigned long target, in long level, in unsigned long internalformat,42 in long width, in long height, in long border, in ArrayBufferView data);43 [StrictTypeChecking] void compressedTexSubImage2D(in unsigned long target, in long level, in long xoffset, in long yoffset,44 in long width, in long height, in unsigned long format, in ArrayBufferView data);45 38 }; 46 39 } -
trunk/Source/WebCore/html/canvas/WebGLExtension.h
r102973 r107107 41 41 WebGLDebugRendererInfoName, 42 42 WebGLDebugShadersName, 43 WebKitWebGLCompressedTexture sName, // WEBKIT_ prefix until extension is official43 WebKitWebGLCompressedTextureS3TCName, // WEBKIT_ prefix until extension is official 44 44 }; 45 45 -
trunk/Source/WebCore/html/canvas/WebGLGetInfo.cpp
r105457 r107107 39 39 #include <wtf/Float32Array.h> 40 40 #include <wtf/Int32Array.h> 41 #include <wtf/Uint32Array.h> 41 42 #include <wtf/Uint8Array.h> 42 43 … … 192 193 } 193 194 195 WebGLGetInfo::WebGLGetInfo(PassRefPtr<Uint32Array> value) 196 : m_type(kTypeWebGLUnsignedIntArray) 197 , m_bool(false) 198 , m_float(0) 199 , m_int(0) 200 , m_unsignedInt(0) 201 , m_webglUnsignedIntArray(value) 202 { 203 } 204 194 205 WebGLGetInfo::WebGLGetInfo(PassRefPtr<WebGLVertexArrayObjectOES> value) 195 206 : m_type(kTypeWebGLVertexArrayObjectOES) … … 295 306 } 296 307 308 PassRefPtr<Uint32Array> WebGLGetInfo::getWebGLUnsignedIntArray() const 309 { 310 ASSERT(getType() == kTypeWebGLUnsignedIntArray); 311 return m_webglUnsignedIntArray; 312 } 313 297 314 PassRefPtr<WebGLVertexArrayObjectOES> WebGLGetInfo::getWebGLVertexArrayObjectOES() const 298 315 { -
trunk/Source/WebCore/html/canvas/WebGLGetInfo.h
r101295 r107107 40 40 #include <wtf/PassRefPtr.h> 41 41 #include <wtf/RefPtr.h> 42 #include <wtf/Uint32Array.h> 42 43 #include <wtf/Uint8Array.h> 43 44 … … 68 69 kTypeWebGLTexture, 69 70 kTypeWebGLUnsignedByteArray, 71 kTypeWebGLUnsignedIntArray, 70 72 kTypeWebGLVertexArrayObjectOES, 71 73 }; … … 89 91 explicit WebGLGetInfo(PassRefPtr<WebGLTexture> value); 90 92 explicit WebGLGetInfo(PassRefPtr<Uint8Array> value); 93 explicit WebGLGetInfo(PassRefPtr<Uint32Array> value); 91 94 explicit WebGLGetInfo(PassRefPtr<WebGLVertexArrayObjectOES> value); 92 95 … … 111 114 PassRefPtr<WebGLTexture> getWebGLTexture() const; 112 115 PassRefPtr<Uint8Array> getWebGLUnsignedByteArray() const; 116 PassRefPtr<Uint32Array> getWebGLUnsignedIntArray() const; 113 117 PassRefPtr<WebGLVertexArrayObjectOES> getWebGLVertexArrayObjectOES() const; 114 118 … … 131 135 RefPtr<WebGLTexture> m_webglTexture; 132 136 RefPtr<Uint8Array> m_webglUnsignedByteArray; 137 RefPtr<Uint32Array> m_webglUnsignedIntArray; 133 138 RefPtr<WebGLVertexArrayObjectOES> m_webglVertexArrayObject; 134 139 }; -
trunk/Source/WebCore/html/canvas/WebGLObject.cpp
r104959 r107107 33 33 #include "OESTextureFloat.h" 34 34 #include "OESVertexArrayObject.h" 35 #include "WebGLCompressedTexture s.h"35 #include "WebGLCompressedTextureS3TC.h" 36 36 #include "WebGLContextGroup.h" 37 37 #include "WebGLDebugRendererInfo.h" -
trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp
r106881 r107107 55 55 #include "WebGLActiveInfo.h" 56 56 #include "WebGLBuffer.h" 57 #include "WebGLCompressedTexture s.h"57 #include "WebGLCompressedTextureS3TC.h" 58 58 #include "WebGLContextAttributes.h" 59 59 #include "WebGLContextEvent.h" … … 73 73 #include <wtf/PassOwnArrayPtr.h> 74 74 #include <wtf/Uint16Array.h> 75 #include <wtf/Uint32Array.h> 75 76 #include <wtf/text/StringBuilder.h> 76 77 … … 542 543 } 543 544 545 void WebGLRenderingContext::addCompressedTextureFormat(GC3Denum format) 546 { 547 if (!m_compressedTextureFormats.contains(format)) 548 m_compressedTextureFormats.append(format); 549 } 550 544 551 WebGLRenderingContext::~WebGLRenderingContext() 545 552 { … … 1213 1220 } 1214 1221 1215 void WebGLRenderingContext::compressedTexImage2D(GC3Denum /*target*/, GC3Dint /*level*/, GC3Denum /*internalformat*/, GC3Dsizei /*width*/, 1216 GC3Dsizei /*height*/, GC3Dint /*border*/, ArrayBufferView* /*data*/) 1217 { 1218 if (isContextLost()) 1219 return; 1220 1221 // FIXME: implement this. 1222 synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "compressedTexImage2D", "invalid internalformat"); 1223 } 1224 1225 void WebGLRenderingContext::compressedTexSubImage2D(GC3Denum /*target*/, GC3Dint /*level*/, GC3Dint /*xoffset*/, GC3Dint /*yoffset*/, 1226 GC3Dsizei /*width*/, GC3Dsizei /*height*/, GC3Denum /*format*/, ArrayBufferView* /*data*/) 1227 { 1228 if (isContextLost()) 1229 return; 1230 1231 // FIXME: implement this. 1232 synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "compressedTexSubImage2D", "invalid format"); 1222 void WebGLRenderingContext::compressedTexImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dsizei width, 1223 GC3Dsizei height, GC3Dint border, ArrayBufferView* data) 1224 { 1225 if (isContextLost()) 1226 return; 1227 if (!validateTexFuncLevel("compressedTexImage2D", target, level)) 1228 return; 1229 1230 if (!validateCompressedTexFormat(internalformat)) { 1231 synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "compressedTexImage2D", "invalid internalformat"); 1232 return; 1233 } 1234 if (border) { 1235 synthesizeGLError(GraphicsContext3D::INVALID_VALUE, "compressedTexImage2D", "border not 0"); 1236 return; 1237 } 1238 if (!validateCompressedTexDimensions("compressedTexImage2D", level, width, height, internalformat)) 1239 return; 1240 if (!validateCompressedTexFuncData("compressedTexImage2D", width, height, internalformat, data)) 1241 return; 1242 1243 WebGLTexture* tex = validateTextureBinding("compressedTexImage2D", target, true); 1244 if (!tex) 1245 return; 1246 if (!isGLES2NPOTStrict()) { 1247 if (level && WebGLTexture::isNPOT(width, height)) { 1248 synthesizeGLError(GraphicsContext3D::INVALID_VALUE, "compressedTexImage2D", "level > 0 not power of 2"); 1249 return; 1250 } 1251 } 1252 graphicsContext3D()->compressedTexImage2D(target, level, internalformat, width, height, 1253 border, data->byteLength(), data->baseAddress()); 1254 tex->setLevelInfo(target, level, internalformat, width, height, GraphicsContext3D::UNSIGNED_BYTE); 1255 cleanupAfterGraphicsCall(false); 1256 } 1257 1258 void WebGLRenderingContext::compressedTexSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, 1259 GC3Dsizei width, GC3Dsizei height, GC3Denum format, ArrayBufferView* data) 1260 { 1261 if (isContextLost()) 1262 return; 1263 if (!validateTexFuncLevel("compressedTexSubImage2D", target, level)) 1264 return; 1265 if (!validateCompressedTexFormat(format)) { 1266 synthesizeGLError(GraphicsContext3D::INVALID_ENUM, "compressedTexSubImage2D", "invalid format"); 1267 return; 1268 } 1269 if (!validateCompressedTexFuncData("compressedTexSubImage2D", width, height, format, data)) 1270 return; 1271 1272 WebGLTexture* tex = validateTextureBinding("compressedTexSubImage2D", target, true); 1273 if (!tex) 1274 return; 1275 1276 if (format != tex->getInternalFormat(target, level)) { 1277 synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "compressedTexSubImage2D", "format does not match texture format"); 1278 return; 1279 } 1280 1281 if (!validateCompressedTexSubDimensions("compressedTexSubImage2D", target, level, xoffset, yoffset, width, height, format, tex)) 1282 return; 1283 1284 graphicsContext3D()->compressedTexSubImage2D(target, level, xoffset, yoffset, 1285 width, height, format, data->byteLength(), data->baseAddress()); 1286 cleanupAfterGraphicsCall(false); 1233 1287 } 1234 1288 … … 2191 2245 return m_webglLoseContext.get(); 2192 2246 } 2193 if (equalIgnoringCase(name, "WEBKIT_WEBGL_compressed_texture s")) {2247 if (equalIgnoringCase(name, "WEBKIT_WEBGL_compressed_texture_s3tc")) { 2194 2248 // Use WEBKIT_ prefix until extension is official. 2195 if (!m_webglCompressedTexture s)2196 m_webglCompressedTexture s = WebGLCompressedTextures::create(this);2197 return m_webglCompressedTexture s.get();2249 if (!m_webglCompressedTextureS3TC) 2250 m_webglCompressedTextureS3TC = WebGLCompressedTextureS3TC::create(this); 2251 return m_webglCompressedTextureS3TC.get(); 2198 2252 } 2199 2253 … … 2308 2362 return getBooleanArrayParameter(pname); 2309 2363 case GraphicsContext3D::COMPRESSED_TEXTURE_FORMATS: 2310 if (m_webglCompressedTextures) 2311 return m_webglCompressedTextures->getCompressedTextureFormats(); 2312 // Defined as null in the spec 2313 return WebGLGetInfo(); 2364 return WebGLGetInfo(Uint32Array::create(m_compressedTextureFormats.data(), m_compressedTextureFormats.size())); 2314 2365 case GraphicsContext3D::CULL_FACE: 2315 2366 return getBooleanParameter(pname); … … 2366 2417 case GraphicsContext3D::MAX_VIEWPORT_DIMS: 2367 2418 return getWebGLIntArrayParameter(pname); 2368 case GraphicsContext3D::NUM_COMPRESSED_TEXTURE_FORMATS:2369 // WebGL 1.0 specifies that there are no compressed texture formats.2370 return WebGLGetInfo(static_cast<int>(0));2371 2419 case GraphicsContext3D::NUM_SHADER_BINARY_FORMATS: 2372 2420 // FIXME: should we always return 0 for this? … … 2641 2689 result.append("OES_vertex_array_object"); 2642 2690 result.append("WEBKIT_WEBGL_lose_context"); 2643 if (WebGLCompressedTexture s::supported(this))2644 result.append("WEBKIT_WEBGL_compressed_texture s");2691 if (WebGLCompressedTextureS3TC::supported(this)) 2692 result.append("WEBKIT_WEBGL_compressed_texture_s3tc"); 2645 2693 2646 2694 if (allowPrivilegedExtensions()) { … … 4686 4734 } 4687 4735 4736 bool WebGLRenderingContext::validateCompressedTexFormat(GC3Denum format) 4737 { 4738 return m_compressedTextureFormats.contains(format); 4739 } 4740 4741 bool WebGLRenderingContext::validateCompressedTexFuncData(const char* functionName, 4742 GC3Dsizei width, GC3Dsizei height, 4743 GC3Denum format, ArrayBufferView* pixels) 4744 { 4745 if (!pixels) { 4746 synthesizeGLError(GraphicsContext3D::INVALID_VALUE, functionName, "no pixels"); 4747 return false; 4748 } 4749 if (width < 0 || height < 0) { 4750 synthesizeGLError(GraphicsContext3D::INVALID_VALUE, functionName, "width or height < 0"); 4751 return false; 4752 } 4753 4754 unsigned int bytesRequired = 0; 4755 4756 switch (format) { 4757 case Extensions3D::COMPRESSED_RGB_S3TC_DXT1_EXT: 4758 case Extensions3D::COMPRESSED_RGBA_S3TC_DXT1_EXT: 4759 { 4760 const int kBlockWidth = 4; 4761 const int kBlockHeight = 4; 4762 const int kBlockSize = 8; 4763 int numBlocksAcross = (width + kBlockWidth - 1) / kBlockWidth; 4764 int numBlocksDown = (height + kBlockHeight - 1) / kBlockHeight; 4765 int numBlocks = numBlocksAcross * numBlocksDown; 4766 bytesRequired = numBlocks * kBlockSize; 4767 } 4768 break; 4769 case Extensions3D::COMPRESSED_RGBA_S3TC_DXT3_EXT: 4770 case Extensions3D::COMPRESSED_RGBA_S3TC_DXT5_EXT: 4771 { 4772 const int kBlockWidth = 4; 4773 const int kBlockHeight = 4; 4774 const int kBlockSize = 16; 4775 int numBlocksAcross = (width + kBlockWidth - 1) / kBlockWidth; 4776 int numBlocksDown = (height + kBlockHeight - 1) / kBlockHeight; 4777 int numBlocks = numBlocksAcross * numBlocksDown; 4778 bytesRequired = numBlocks * kBlockSize; 4779 } 4780 break; 4781 default: 4782 synthesizeGLError(GraphicsContext3D::INVALID_ENUM, functionName, "invalid format"); 4783 return false; 4784 } 4785 4786 if (pixels->byteLength() != bytesRequired) { 4787 synthesizeGLError(GraphicsContext3D::INVALID_VALUE, functionName, "length of ArrayBufferView is not correct for dimensions"); 4788 return false; 4789 } 4790 4791 return true; 4792 } 4793 4794 bool WebGLRenderingContext::validateCompressedTexDimensions(const char* functionName, GC3Dint level, GC3Dsizei width, GC3Dsizei height, GC3Denum format) 4795 { 4796 switch (format) { 4797 case Extensions3D::COMPRESSED_RGB_S3TC_DXT1_EXT: 4798 case Extensions3D::COMPRESSED_RGBA_S3TC_DXT1_EXT: 4799 case Extensions3D::COMPRESSED_RGBA_S3TC_DXT3_EXT: 4800 case Extensions3D::COMPRESSED_RGBA_S3TC_DXT5_EXT: { 4801 const int kBlockWidth = 4; 4802 const int kBlockHeight = 4; 4803 bool widthValid = (level && width == 1) || (level && width == 2) || !(width % kBlockWidth); 4804 bool heightValid = (level && height == 1) || (level && height == 2) || !(height % kBlockHeight); 4805 if (!widthValid || !heightValid) { 4806 synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, functionName, "width or height invalid for level"); 4807 return false; 4808 } 4809 return true; 4810 } 4811 default: 4812 return false; 4813 } 4814 } 4815 4816 bool WebGLRenderingContext::validateCompressedTexSubDimensions(const char* functionName, GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, 4817 GC3Dsizei width, GC3Dsizei height, GC3Denum format, WebGLTexture* tex) 4818 { 4819 if (xoffset < 0 || yoffset < 0) { 4820 synthesizeGLError(GraphicsContext3D::INVALID_VALUE, functionName, "xoffset or yoffset < 0"); 4821 return false; 4822 } 4823 4824 switch (format) { 4825 case Extensions3D::COMPRESSED_RGB_S3TC_DXT1_EXT: 4826 case Extensions3D::COMPRESSED_RGBA_S3TC_DXT1_EXT: 4827 case Extensions3D::COMPRESSED_RGBA_S3TC_DXT3_EXT: 4828 case Extensions3D::COMPRESSED_RGBA_S3TC_DXT5_EXT: { 4829 const int kBlockWidth = 4; 4830 const int kBlockHeight = 4; 4831 if ((xoffset % kBlockWidth) || (yoffset % kBlockHeight)) { 4832 synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, functionName, "xoffset or yoffset not multiple of 4"); 4833 return false; 4834 } 4835 if (width - xoffset > tex->getWidth(target, level) 4836 || height - yoffset > tex->getHeight(target, level)) { 4837 synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, functionName, "dimensions out of range"); 4838 return false; 4839 } 4840 return validateCompressedTexDimensions(functionName, level, width, height, format); 4841 } 4842 default: 4843 return false; 4844 } 4845 } 4846 4688 4847 bool WebGLRenderingContext::validateDrawMode(const char* functionName, GC3Denum mode) 4689 4848 { -
trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h
r106873 r107107 53 53 class WebGLContextGroup; 54 54 class WebGLContextObject; 55 class WebGLCompressedTexture s;55 class WebGLCompressedTextureS3TC; 56 56 class WebGLContextAttributes; 57 57 class WebGLDebugRendererInfo; … … 322 322 friend class OESVertexArrayObject; 323 323 friend class WebGLDebugShaders; 324 friend class WebGLCompressedTexture s;324 friend class WebGLCompressedTextureS3TC; 325 325 friend class WebGLRenderingContextErrorMessageCallback; 326 326 … … 367 367 368 368 bool validateWebGLObject(const char*, WebGLObject*); 369 370 // Adds a compressed texture format. 371 void addCompressedTextureFormat(GC3Denum); 369 372 370 373 #if ENABLE(VIDEO) … … 444 447 RefPtr<WebGLTexture> m_blackTextureCubeMap; 445 448 449 Vector<GC3Denum> m_compressedTextureFormats; 450 446 451 // Fixed-size cache of reusable image buffers for video texImage2D calls. 447 452 class LRUImageBufferCache { … … 501 506 OwnPtr<WebGLDebugRendererInfo> m_webglDebugRendererInfo; 502 507 OwnPtr<WebGLDebugShaders> m_webglDebugShaders; 503 OwnPtr<WebGLCompressedTexture s> m_webglCompressedTextures;508 OwnPtr<WebGLCompressedTextureS3TC> m_webglCompressedTextureS3TC; 504 509 505 510 // Helpers for getParameter and others … … 589 594 ArrayBufferView* pixels); 590 595 596 // Helper function to validate compressed texture data is correct size 597 // for the given format and dimensions. 598 bool validateCompressedTexFuncData(const char* functionName, 599 GC3Dsizei width, GC3Dsizei height, 600 GC3Denum format, ArrayBufferView* pixels); 601 602 // Helper function for validating compressed texture formats. 603 bool validateCompressedTexFormat(GC3Denum format); 604 605 // Helper function to validate compressed texture dimensions are valid for 606 // the given format. 607 bool validateCompressedTexDimensions(const char* functionName, GC3Dint level, GC3Dsizei width, GC3Dsizei height, GC3Denum format); 608 609 // Helper function to validate compressed texture dimensions are valid for 610 // the given format. 611 bool validateCompressedTexSubDimensions(const char* functionName, GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, 612 GC3Dsizei width, GC3Dsizei height, GC3Denum format, WebGLTexture*); 613 591 614 // Helper function to validate mode for draw{Arrays/Elements}. 592 615 bool validateDrawMode(const char* functionName, GC3Denum); -
trunk/Source/WebCore/html/canvas/WebGLRenderingContext.idl
r106892 r107107 207 207 /* TEXTURE_WRAP_T */ 208 208 209 const unsigned int NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2;210 209 const unsigned int COMPRESSED_TEXTURE_FORMATS = 0x86A3; 211 210
Note: See TracChangeset
for help on using the changeset viewer.