| Differences between
and this patch
- a/Source/WebCore/ChangeLog +56 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2013-02-28  Nayan Kumar K  <nayankk@motorola.com>
2
3
        [WebGL] Support for texImage2D of type HALF_FLOAT_OES with ArrayBufferView.
4
        https://bugs.webkit.org/show_bug.cgi?id=110818
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        As per OES_texture_half_float specification texImage2D and texSubImage2D entry
9
        points taking ArrayBufferView should extended to accept null with the pixel type
10
        HALF_FLOAT_OES.
11
12
        Tests: fast/canvas/webgl/oes-texture-half-float-not-supported.html
13
               fast/canvas/webgl/oes-texture-half-float.html
14
15
        * CMakeLists.txt:
16
        * DerivedSources.make:
17
        * DerivedSources.pri:
18
        * GNUmakefile.list.am:
19
        * Target.pri:
20
        * WebCore.gypi:
21
        * WebCore.xcodeproj/project.pbxproj:
22
        * bindings/js/JSWebGLRenderingContextCustom.cpp:
23
        (WebCore::toJS):
24
        * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
25
        (WebCore::toV8Object):
26
        * html/canvas/OESTextureHalfFloat.cpp: Copied from Source/WebCore/html/canvas/WebGLExtension.h.
27
        (WebCore):
28
        (WebCore::OESTextureHalfFloat::OESTextureHalfFloat):
29
        (WebCore::OESTextureHalfFloat::~OESTextureHalfFloat):
30
        (WebCore::OESTextureHalfFloat::getName):
31
        (WebCore::OESTextureHalfFloat::create):
32
        * html/canvas/OESTextureHalfFloat.h: Copied from Source/WebCore/html/canvas/WebGLExtension.h.
33
        (WebCore):
34
        (OESTextureHalfFloat):
35
        * html/canvas/OESTextureHalfFloat.idl: Copied from Source/WebCore/html/canvas/WebGLExtension.h.
36
        * html/canvas/WebGLExtension.h:
37
        * html/canvas/WebGLRenderingContext.cpp:
38
        (WebCore):
39
        (WebCore::WebGLRenderingContext::getExtension):
40
        (WebCore::WebGLRenderingContext::texImage2D):
41
        (WebCore::WebGLRenderingContext::texSubImage2D):
42
        (WebCore::WebGLRenderingContext::validateTexFuncFormatAndType):
43
        (WebCore::WebGLRenderingContext::validateTexFuncData):
44
        * html/canvas/WebGLRenderingContext.h:
45
        (WebCore):
46
        (WebGLRenderingContext):
47
        * html/canvas/WebGLRenderingContext.idl:
48
        * platform/graphics/Extensions3D.h:
49
        (Extensions3D):
50
        * platform/graphics/GraphicsContext3D.cpp:
51
        (WebCore::GraphicsContext3D::computeFormatAndTypeParameters):
52
        * platform/graphics/GraphicsContext3D.h:
53
        * platform/graphics/GraphicsTypes3D.h:
54
        * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
55
        (WebCore::GraphicsContext3D::texImage2D):
56
1
2013-03-01  Roger Fong  <roger_fong@apple.com>
57
2013-03-01  Roger Fong  <roger_fong@apple.com>
2
58
3
        Unreviewed AppleWin build fix.
59
        Unreviewed AppleWin build fix.
- a/Source/WebCore/CMakeLists.txt +5 lines
Lines 522-527 set(WebCore_IDL_FILES a/Source/WebCore/CMakeLists.txt_sec1
522
    html/canvas/Int8Array.idl
522
    html/canvas/Int8Array.idl
523
    html/canvas/OESStandardDerivatives.idl
523
    html/canvas/OESStandardDerivatives.idl
524
    html/canvas/OESTextureFloat.idl
524
    html/canvas/OESTextureFloat.idl
525
    html/canvas/OESTextureHalfFloat.idl
525
    html/canvas/OESVertexArrayObject.idl
526
    html/canvas/OESVertexArrayObject.idl
526
    html/canvas/OESElementIndexUint.idl
527
    html/canvas/OESElementIndexUint.idl
527
    html/canvas/Uint16Array.idl
528
    html/canvas/Uint16Array.idl
Lines 1511-1516 set(WebCore_SOURCES a/Source/WebCore/CMakeLists.txt_sec2
1511
    html/canvas/EXTTextureFilterAnisotropic.cpp
1512
    html/canvas/EXTTextureFilterAnisotropic.cpp
1512
    html/canvas/OESStandardDerivatives.cpp
1513
    html/canvas/OESStandardDerivatives.cpp
1513
    html/canvas/OESTextureFloat.cpp
1514
    html/canvas/OESTextureFloat.cpp
1515
    html/canvas/OESTextureHalfFloat.cpp
1514
    html/canvas/OESVertexArrayObject.cpp
1516
    html/canvas/OESVertexArrayObject.cpp
1515
    html/canvas/OESElementIndexUint.cpp
1517
    html/canvas/OESElementIndexUint.cpp
1516
    html/canvas/WebGLBuffer.cpp
1518
    html/canvas/WebGLBuffer.cpp
Lines 2625-2630 if (ENABLE_WEBGL) a/Source/WebCore/CMakeLists.txt_sec3
2625
    list(APPEND WebCore_SOURCES
2627
    list(APPEND WebCore_SOURCES
2626
        html/canvas/OESStandardDerivatives.cpp
2628
        html/canvas/OESStandardDerivatives.cpp
2627
        html/canvas/OESTextureFloat.cpp
2629
        html/canvas/OESTextureFloat.cpp
2630
        html/canvas/OESTextureHalfFloat.cpp
2628
        html/canvas/OESVertexArrayObject.cpp
2631
        html/canvas/OESVertexArrayObject.cpp
2629
        html/canvas/OESElementIndexUint.cpp
2632
        html/canvas/OESElementIndexUint.cpp
2630
        html/canvas/WebGLBuffer.cpp
2633
        html/canvas/WebGLBuffer.cpp
Lines 2654-2659 if (ENABLE_WEBGL) a/Source/WebCore/CMakeLists.txt_sec4
2654
        html/canvas/EXTTextureFilterAnisotropic.cpp
2657
        html/canvas/EXTTextureFilterAnisotropic.cpp
2655
        html/canvas/OESStandardDerivatives.cpp
2658
        html/canvas/OESStandardDerivatives.cpp
2656
        html/canvas/OESTextureFloat.cpp
2659
        html/canvas/OESTextureFloat.cpp
2660
        html/canvas/OESTextureHalfFloat.cpp
2657
        html/canvas/OESVertexArrayObject.cpp
2661
        html/canvas/OESVertexArrayObject.cpp
2658
        html/canvas/OESElementIndexUint.cpp
2662
        html/canvas/OESElementIndexUint.cpp
2659
    )
2663
    )
Lines 2662-2667 if (ENABLE_WEBGL) a/Source/WebCore/CMakeLists.txt_sec5
2662
        html/canvas/EXTTextureFilterAnisotropic.idl
2666
        html/canvas/EXTTextureFilterAnisotropic.idl
2663
        html/canvas/OESStandardDerivatives.idl
2667
        html/canvas/OESStandardDerivatives.idl
2664
        html/canvas/OESTextureFloat.idl
2668
        html/canvas/OESTextureFloat.idl
2669
        html/canvas/OESTextureHalfFloat.idl
2665
        html/canvas/OESVertexArrayObject.idl
2670
        html/canvas/OESVertexArrayObject.idl
2666
        html/canvas/OESElementIndexUint.idl
2671
        html/canvas/OESElementIndexUint.idl
2667
        html/canvas/WebGLActiveInfo.idl
2672
        html/canvas/WebGLActiveInfo.idl
- a/Source/WebCore/DerivedSources.make +1 lines
Lines 400-405 BINDING_IDLS = \ a/Source/WebCore/DerivedSources.make_sec1
400
    $(WebCore)/html/canvas/OESElementIndexUint.idl \
400
    $(WebCore)/html/canvas/OESElementIndexUint.idl \
401
    $(WebCore)/html/canvas/OESStandardDerivatives.idl \
401
    $(WebCore)/html/canvas/OESStandardDerivatives.idl \
402
    $(WebCore)/html/canvas/OESTextureFloat.idl \
402
    $(WebCore)/html/canvas/OESTextureFloat.idl \
403
    $(WebCore)/html/canvas/OESTextureHalfFloat.idl \
403
    $(WebCore)/html/canvas/OESVertexArrayObject.idl \
404
    $(WebCore)/html/canvas/OESVertexArrayObject.idl \
404
    $(WebCore)/html/canvas/Uint16Array.idl \
405
    $(WebCore)/html/canvas/Uint16Array.idl \
405
    $(WebCore)/html/canvas/Uint32Array.idl \
406
    $(WebCore)/html/canvas/Uint32Array.idl \
- a/Source/WebCore/DerivedSources.pri +1 lines
Lines 313-318 IDL_BINDINGS += \ a/Source/WebCore/DerivedSources.pri_sec1
313
    $$PWD/html/canvas/EXTTextureFilterAnisotropic.idl \
313
    $$PWD/html/canvas/EXTTextureFilterAnisotropic.idl \
314
    $$PWD/html/canvas/OESStandardDerivatives.idl \
314
    $$PWD/html/canvas/OESStandardDerivatives.idl \
315
    $$PWD/html/canvas/OESTextureFloat.idl \
315
    $$PWD/html/canvas/OESTextureFloat.idl \
316
    $$PWD/html/canvas/OESTextureHalfFloat.idl \
316
    $$PWD/html/canvas/OESVertexArrayObject.idl \
317
    $$PWD/html/canvas/OESVertexArrayObject.idl \
317
    $$PWD/html/canvas/OESElementIndexUint.idl \
318
    $$PWD/html/canvas/OESElementIndexUint.idl \
318
    $$PWD/html/canvas/WebGLActiveInfo.idl \
319
    $$PWD/html/canvas/WebGLActiveInfo.idl \
- a/Source/WebCore/GNUmakefile.list.am +5 lines
Lines 579-584 webcore_built_sources += \ a/Source/WebCore/GNUmakefile.list.am_sec1
579
	DerivedSources/WebCore/JSOESStandardDerivatives.h \
579
	DerivedSources/WebCore/JSOESStandardDerivatives.h \
580
	DerivedSources/WebCore/JSOESTextureFloat.cpp \
580
	DerivedSources/WebCore/JSOESTextureFloat.cpp \
581
	DerivedSources/WebCore/JSOESTextureFloat.h \
581
	DerivedSources/WebCore/JSOESTextureFloat.h \
582
	DerivedSources/WebCore/JSOESTextureHalfFloat.cpp \
583
	DerivedSources/WebCore/JSOESTextureHalfFloat.h \
582
	DerivedSources/WebCore/JSOESVertexArrayObject.cpp \
584
	DerivedSources/WebCore/JSOESVertexArrayObject.cpp \
583
	DerivedSources/WebCore/JSOESVertexArrayObject.h \
585
	DerivedSources/WebCore/JSOESVertexArrayObject.h \
584
	DerivedSources/WebCore/JSOESElementIndexUint.cpp \
586
	DerivedSources/WebCore/JSOESElementIndexUint.cpp \
Lines 1544-1549 dom_binding_idls += \ a/Source/WebCore/GNUmakefile.list.am_sec2
1544
	$(WebCore)/html/canvas/Int8Array.idl \
1546
	$(WebCore)/html/canvas/Int8Array.idl \
1545
	$(WebCore)/html/canvas/OESStandardDerivatives.idl \
1547
	$(WebCore)/html/canvas/OESStandardDerivatives.idl \
1546
	$(WebCore)/html/canvas/OESTextureFloat.idl \
1548
	$(WebCore)/html/canvas/OESTextureFloat.idl \
1549
	$(WebCore)/html/canvas/OESTextureHalfFloat.idl \
1547
	$(WebCore)/html/canvas/OESVertexArrayObject.idl \
1550
	$(WebCore)/html/canvas/OESVertexArrayObject.idl \
1548
	$(WebCore)/html/canvas/OESElementIndexUint.idl \
1551
	$(WebCore)/html/canvas/OESElementIndexUint.idl \
1549
	$(WebCore)/html/canvas/Uint16Array.idl \
1552
	$(WebCore)/html/canvas/Uint16Array.idl \
Lines 3284-3289 webcore_sources += \ a/Source/WebCore/GNUmakefile.list.am_sec3
3284
	Source/WebCore/html/canvas/OESStandardDerivatives.h \
3287
	Source/WebCore/html/canvas/OESStandardDerivatives.h \
3285
	Source/WebCore/html/canvas/OESTextureFloat.cpp \
3288
	Source/WebCore/html/canvas/OESTextureFloat.cpp \
3286
	Source/WebCore/html/canvas/OESTextureFloat.h \
3289
	Source/WebCore/html/canvas/OESTextureFloat.h \
3290
	Source/WebCore/html/canvas/OESTextureHalfFloat.cpp \
3291
	Source/WebCore/html/canvas/OESTextureHalfFloat.h \
3287
	Source/WebCore/html/canvas/OESVertexArrayObject.cpp \
3292
	Source/WebCore/html/canvas/OESVertexArrayObject.cpp \
3288
	Source/WebCore/html/canvas/OESVertexArrayObject.h \
3293
	Source/WebCore/html/canvas/OESVertexArrayObject.h \
3289
	Source/WebCore/html/canvas/OESElementIndexUint.cpp \
3294
	Source/WebCore/html/canvas/OESElementIndexUint.cpp \
- a/Source/WebCore/Target.pri +2 lines
Lines 4039-4044 enable?(WEBGL) { a/Source/WebCore/Target.pri_sec1
4039
        html/canvas/EXTTextureFilterAnisotropic.h \
4039
        html/canvas/EXTTextureFilterAnisotropic.h \
4040
        html/canvas/OESStandardDerivatives.h \
4040
        html/canvas/OESStandardDerivatives.h \
4041
        html/canvas/OESTextureFloat.h \
4041
        html/canvas/OESTextureFloat.h \
4042
        html/canvas/OESTextureHalfFloat.h \
4042
        html/canvas/OESVertexArrayObject.h \
4043
        html/canvas/OESVertexArrayObject.h \
4043
        html/canvas/OESElementIndexUint.h \
4044
        html/canvas/OESElementIndexUint.h \
4044
        html/canvas/WebGLTexture.h \
4045
        html/canvas/WebGLTexture.h \
Lines 4074-4079 enable?(WEBGL) { a/Source/WebCore/Target.pri_sec2
4074
        html/canvas/EXTTextureFilterAnisotropic.cpp \
4075
        html/canvas/EXTTextureFilterAnisotropic.cpp \
4075
        html/canvas/OESStandardDerivatives.cpp \
4076
        html/canvas/OESStandardDerivatives.cpp \
4076
        html/canvas/OESTextureFloat.cpp \
4077
        html/canvas/OESTextureFloat.cpp \
4078
        html/canvas/OESTextureHalfFloat.cpp \
4077
        html/canvas/OESVertexArrayObject.cpp \
4079
        html/canvas/OESVertexArrayObject.cpp \
4078
        html/canvas/OESElementIndexUint.cpp \
4080
        html/canvas/OESElementIndexUint.cpp \
4079
        html/canvas/WebGLTexture.cpp \
4081
        html/canvas/WebGLTexture.cpp \
- a/Source/WebCore/WebCore.gypi +3 lines
Lines 465-470 a/Source/WebCore/WebCore.gypi_sec1
465
            'html/canvas/Int8Array.idl',
465
            'html/canvas/Int8Array.idl',
466
            'html/canvas/OESStandardDerivatives.idl',
466
            'html/canvas/OESStandardDerivatives.idl',
467
            'html/canvas/OESTextureFloat.idl',
467
            'html/canvas/OESTextureFloat.idl',
468
            'html/canvas/OESTextureHalfFloat.idl',
468
            'html/canvas/OESVertexArrayObject.idl',
469
            'html/canvas/OESVertexArrayObject.idl',
469
            'html/canvas/OESElementIndexUint.idl',
470
            'html/canvas/OESElementIndexUint.idl',
470
            'html/canvas/Uint16Array.idl',
471
            'html/canvas/Uint16Array.idl',
Lines 3423-3428 a/Source/WebCore/WebCore.gypi_sec2
3423
            'html/canvas/OESStandardDerivatives.h',
3424
            'html/canvas/OESStandardDerivatives.h',
3424
            'html/canvas/OESTextureFloat.cpp',
3425
            'html/canvas/OESTextureFloat.cpp',
3425
            'html/canvas/OESTextureFloat.h',
3426
            'html/canvas/OESTextureFloat.h',
3427
            'html/canvas/OESTextureHalfFloat.cpp',
3428
            'html/canvas/OESTextureHalfFloat.h',
3426
            'html/canvas/OESVertexArrayObject.cpp',
3429
            'html/canvas/OESVertexArrayObject.cpp',
3427
            'html/canvas/OESVertexArrayObject.h',
3430
            'html/canvas/OESVertexArrayObject.h',
3428
            'html/canvas/OESElementIndexUint.cpp',
3431
            'html/canvas/OESElementIndexUint.cpp',
- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj -5 / +22 lines
Lines 1918-1925 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec1
1918
		6EBF0E5412A8929800DB1709 /* WebGLExtension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6EBF0E5212A8929800DB1709 /* WebGLExtension.cpp */; };
1918
		6EBF0E5412A8929800DB1709 /* WebGLExtension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6EBF0E5212A8929800DB1709 /* WebGLExtension.cpp */; };
1919
		6EBF0E5512A8929800DB1709 /* WebGLExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EBF0E5312A8929800DB1709 /* WebGLExtension.h */; };
1919
		6EBF0E5512A8929800DB1709 /* WebGLExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EBF0E5312A8929800DB1709 /* WebGLExtension.h */; };
1920
		6EBF0E7612A9868800DB1709 /* JSOESTextureFloat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6EBF0E7412A9868800DB1709 /* JSOESTextureFloat.cpp */; };
1920
		6EBF0E7612A9868800DB1709 /* JSOESTextureFloat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6EBF0E7412A9868800DB1709 /* JSOESTextureFloat.cpp */; };
1921
		6EBF0E7712A9868800DB1709 /* JSOESTextureFloat.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EBF0E7512A9868800DB1709 /* JSOESTextureFloat.h */; };
1922
		6EBF0E7612A9868800DB170A /* JSEXTDrawBuffers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6EBF0E7412A9868800DB170A /* JSEXTDrawBuffers.cpp */; };
1921
		6EBF0E7612A9868800DB170A /* JSEXTDrawBuffers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6EBF0E7412A9868800DB170A /* JSEXTDrawBuffers.cpp */; };
1922
		6EBF0E7712A9868800DB1709 /* JSOESTextureFloat.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EBF0E7512A9868800DB1709 /* JSOESTextureFloat.h */; };
1923
		6EBF0E7712A9868800DB170A /* JSEXTDrawBuffers.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EBF0E7512A9868800DB170A /* JSEXTDrawBuffers.h */; };
1923
		6EBF0E7712A9868800DB170A /* JSEXTDrawBuffers.h in Headers */ = {isa = PBXBuildFile; fileRef = 6EBF0E7512A9868800DB170A /* JSEXTDrawBuffers.h */; };
1924
		6ED878C4147493F4004C3597 /* RenderTableCaption.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6ED878C2147493F4004C3597 /* RenderTableCaption.cpp */; };
1924
		6ED878C4147493F4004C3597 /* RenderTableCaption.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6ED878C2147493F4004C3597 /* RenderTableCaption.cpp */; };
1925
		6ED878C5147493F4004C3597 /* RenderTableCaption.h in Headers */ = {isa = PBXBuildFile; fileRef = 6ED878C3147493F4004C3597 /* RenderTableCaption.h */; };
1925
		6ED878C5147493F4004C3597 /* RenderTableCaption.h in Headers */ = {isa = PBXBuildFile; fileRef = 6ED878C3147493F4004C3597 /* RenderTableCaption.h */; };
Lines 3841-3847 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec2
3841
		A00B721A11DE6428008AB9FF /* CheckedInt.h in Headers */ = {isa = PBXBuildFile; fileRef = A00B721911DE6427008AB9FF /* CheckedInt.h */; };
3841
		A00B721A11DE6428008AB9FF /* CheckedInt.h in Headers */ = {isa = PBXBuildFile; fileRef = A00B721911DE6427008AB9FF /* CheckedInt.h */; };
3842
		A024575116CEAA27000E5671 /* EXTDrawBuffers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A024574E16CEAA27000E5671 /* EXTDrawBuffers.cpp */; };
3842
		A024575116CEAA27000E5671 /* EXTDrawBuffers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A024574E16CEAA27000E5671 /* EXTDrawBuffers.cpp */; };
3843
		A024575216CEAA27000E5671 /* EXTDrawBuffers.h in Headers */ = {isa = PBXBuildFile; fileRef = A024574F16CEAA27000E5671 /* EXTDrawBuffers.h */; };
3843
		A024575216CEAA27000E5671 /* EXTDrawBuffers.h in Headers */ = {isa = PBXBuildFile; fileRef = A024574F16CEAA27000E5671 /* EXTDrawBuffers.h */; };
3844
		A024575316CEAA27000E5671 /* EXTDrawBuffers.idl in Resources */ = {isa = PBXBuildFile; fileRef = A024575016CEAA27000E5671 /* EXTDrawBuffers.idl */; };
3845
		A07D3355152B630E001B6393 /* JSWebGLShaderPrecisionFormat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A07D3353152B630E001B6393 /* JSWebGLShaderPrecisionFormat.cpp */; };
3844
		A07D3355152B630E001B6393 /* JSWebGLShaderPrecisionFormat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A07D3353152B630E001B6393 /* JSWebGLShaderPrecisionFormat.cpp */; };
3846
		A07D3356152B630E001B6393 /* JSWebGLShaderPrecisionFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = A07D3354152B630E001B6393 /* JSWebGLShaderPrecisionFormat.h */; };
3845
		A07D3356152B630E001B6393 /* JSWebGLShaderPrecisionFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = A07D3354152B630E001B6393 /* JSWebGLShaderPrecisionFormat.h */; };
3847
		A07D3358152B632D001B6393 /* WebGLShaderPrecisionFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = A07D3357152B632D001B6393 /* WebGLShaderPrecisionFormat.h */; };
3846
		A07D3358152B632D001B6393 /* WebGLShaderPrecisionFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = A07D3357152B632D001B6393 /* WebGLShaderPrecisionFormat.h */; };
Lines 3883-3888 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec3
3883
		A2E8AE4016A498CF006BB3AA /* DOMWebKitCSSFilterRule.h in Headers */ = {isa = PBXBuildFile; fileRef = A2E8AE3D16A498CF006BB3AA /* DOMWebKitCSSFilterRule.h */; };
3882
		A2E8AE4016A498CF006BB3AA /* DOMWebKitCSSFilterRule.h in Headers */ = {isa = PBXBuildFile; fileRef = A2E8AE3D16A498CF006BB3AA /* DOMWebKitCSSFilterRule.h */; };
3884
		A2E8AE4116A498CF006BB3AA /* DOMWebKitCSSFilterRule.mm in Sources */ = {isa = PBXBuildFile; fileRef = A2E8AE3E16A498CF006BB3AA /* DOMWebKitCSSFilterRule.mm */; };
3883
		A2E8AE4116A498CF006BB3AA /* DOMWebKitCSSFilterRule.mm in Sources */ = {isa = PBXBuildFile; fileRef = A2E8AE3E16A498CF006BB3AA /* DOMWebKitCSSFilterRule.mm */; };
3885
		A2E8AE4216A498CF006BB3AA /* DOMWebKitCSSFilterRuleInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = A2E8AE3F16A498CF006BB3AA /* DOMWebKitCSSFilterRuleInternal.h */; };
3884
		A2E8AE4216A498CF006BB3AA /* DOMWebKitCSSFilterRuleInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = A2E8AE3F16A498CF006BB3AA /* DOMWebKitCSSFilterRuleInternal.h */; };
3885
		A31C4E4D16E02AA6002F7957 /* OESTextureHalfFloat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A31C4E4C16E02AA6002F7957 /* OESTextureHalfFloat.cpp */; };
3886
		A31C4E4F16E02AB4002F7957 /* OESTextureHalfFloat.h in Headers */ = {isa = PBXBuildFile; fileRef = A31C4E4E16E02AB4002F7957 /* OESTextureHalfFloat.h */; };
3887
		A31C4E5216E02B08002F7957 /* JSOESTextureHalfFloat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A31C4E5116E02B08002F7957 /* JSOESTextureHalfFloat.cpp */; };
3888
		A31C4E5416E02B40002F7957 /* JSOESTextureHalfFloat.h in Headers */ = {isa = PBXBuildFile; fileRef = A31C4E5316E02B40002F7957 /* JSOESTextureHalfFloat.h */; };
3886
		A3BB59F31457A40D00AC56FE /* DocumentEventQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A3BB59F11457A40D00AC56FE /* DocumentEventQueue.cpp */; };
3889
		A3BB59F31457A40D00AC56FE /* DocumentEventQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A3BB59F11457A40D00AC56FE /* DocumentEventQueue.cpp */; };
3887
		A3BB59F41457A40D00AC56FE /* DocumentEventQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = A3BB59F21457A40D00AC56FE /* DocumentEventQueue.h */; settings = {ATTRIBUTES = (Private, ); }; };
3890
		A3BB59F41457A40D00AC56FE /* DocumentEventQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = A3BB59F21457A40D00AC56FE /* DocumentEventQueue.h */; settings = {ATTRIBUTES = (Private, ); }; };
3888
		A3E2643014748991005A8588 /* WorkerEventQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A3E2642E14748991005A8588 /* WorkerEventQueue.cpp */; };
3891
		A3E2643014748991005A8588 /* WorkerEventQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A3E2642E14748991005A8588 /* WorkerEventQueue.cpp */; };
Lines 9389-9396 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec4
9389
		6EBF0E5212A8929800DB1709 /* WebGLExtension.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebGLExtension.cpp; path = canvas/WebGLExtension.cpp; sourceTree = "<group>"; };
9392
		6EBF0E5212A8929800DB1709 /* WebGLExtension.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebGLExtension.cpp; path = canvas/WebGLExtension.cpp; sourceTree = "<group>"; };
9390
		6EBF0E5312A8929800DB1709 /* WebGLExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGLExtension.h; path = canvas/WebGLExtension.h; sourceTree = "<group>"; };
9393
		6EBF0E5312A8929800DB1709 /* WebGLExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGLExtension.h; path = canvas/WebGLExtension.h; sourceTree = "<group>"; };
9391
		6EBF0E7412A9868800DB1709 /* JSOESTextureFloat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSOESTextureFloat.cpp; sourceTree = "<group>"; };
9394
		6EBF0E7412A9868800DB1709 /* JSOESTextureFloat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSOESTextureFloat.cpp; sourceTree = "<group>"; };
9392
		6EBF0E7512A9868800DB1709 /* JSOESTextureFloat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSOESTextureFloat.h; sourceTree = "<group>"; };
9393
		6EBF0E7412A9868800DB170A /* JSEXTDrawBuffers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSEXTDrawBuffers.cpp; sourceTree = "<group>"; };
9395
		6EBF0E7412A9868800DB170A /* JSEXTDrawBuffers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSEXTDrawBuffers.cpp; sourceTree = "<group>"; };
9396
		6EBF0E7512A9868800DB1709 /* JSOESTextureFloat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSOESTextureFloat.h; sourceTree = "<group>"; };
9394
		6EBF0E7512A9868800DB170A /* JSEXTDrawBuffers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEXTDrawBuffers.h; sourceTree = "<group>"; };
9397
		6EBF0E7512A9868800DB170A /* JSEXTDrawBuffers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEXTDrawBuffers.h; sourceTree = "<group>"; };
9395
		6ED878C2147493F4004C3597 /* RenderTableCaption.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderTableCaption.cpp; sourceTree = "<group>"; };
9398
		6ED878C2147493F4004C3597 /* RenderTableCaption.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderTableCaption.cpp; sourceTree = "<group>"; };
9396
		6ED878C3147493F4004C3597 /* RenderTableCaption.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderTableCaption.h; sourceTree = "<group>"; };
9399
		6ED878C3147493F4004C3597 /* RenderTableCaption.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderTableCaption.h; sourceTree = "<group>"; };
Lines 11392-11397 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec5
11392
		A2E8AE3D16A498CF006BB3AA /* DOMWebKitCSSFilterRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMWebKitCSSFilterRule.h; sourceTree = "<group>"; };
11395
		A2E8AE3D16A498CF006BB3AA /* DOMWebKitCSSFilterRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMWebKitCSSFilterRule.h; sourceTree = "<group>"; };
11393
		A2E8AE3E16A498CF006BB3AA /* DOMWebKitCSSFilterRule.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMWebKitCSSFilterRule.mm; sourceTree = "<group>"; };
11396
		A2E8AE3E16A498CF006BB3AA /* DOMWebKitCSSFilterRule.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMWebKitCSSFilterRule.mm; sourceTree = "<group>"; };
11394
		A2E8AE3F16A498CF006BB3AA /* DOMWebKitCSSFilterRuleInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMWebKitCSSFilterRuleInternal.h; sourceTree = "<group>"; };
11397
		A2E8AE3F16A498CF006BB3AA /* DOMWebKitCSSFilterRuleInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMWebKitCSSFilterRuleInternal.h; sourceTree = "<group>"; };
11398
		A31C4E4C16E02AA6002F7957 /* OESTextureHalfFloat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OESTextureHalfFloat.cpp; path = canvas/OESTextureHalfFloat.cpp; sourceTree = "<group>"; };
11399
		A31C4E4E16E02AB4002F7957 /* OESTextureHalfFloat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OESTextureHalfFloat.h; path = canvas/OESTextureHalfFloat.h; sourceTree = "<group>"; };
11400
		A31C4E5016E02AC5002F7957 /* OESTextureHalfFloat.idl */ = {isa = PBXFileReference; lastKnownFileType = text; name = OESTextureHalfFloat.idl; path = canvas/OESTextureHalfFloat.idl; sourceTree = "<group>"; };
11401
		A31C4E5116E02B08002F7957 /* JSOESTextureHalfFloat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSOESTextureHalfFloat.cpp; path = JSOESTextureHalfFloat.cpp; sourceTree = "<group>"; };
11402
		A31C4E5316E02B40002F7957 /* JSOESTextureHalfFloat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSOESTextureHalfFloat.h; path = JSOESTextureHalfFloat.h; sourceTree = "<group>"; };
11395
		A3BB59F11457A40D00AC56FE /* DocumentEventQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentEventQueue.cpp; sourceTree = "<group>"; };
11403
		A3BB59F11457A40D00AC56FE /* DocumentEventQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentEventQueue.cpp; sourceTree = "<group>"; };
11396
		A3BB59F21457A40D00AC56FE /* DocumentEventQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentEventQueue.h; sourceTree = "<group>"; };
11404
		A3BB59F21457A40D00AC56FE /* DocumentEventQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentEventQueue.h; sourceTree = "<group>"; };
11397
		A3E2642E14748991005A8588 /* WorkerEventQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WorkerEventQueue.cpp; path = workers/WorkerEventQueue.cpp; sourceTree = "<group>"; };
11405
		A3E2642E14748991005A8588 /* WorkerEventQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WorkerEventQueue.cpp; path = workers/WorkerEventQueue.cpp; sourceTree = "<group>"; };
Lines 15765-15770 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec6
15765
				6EBF0E4512A8926100DB1709 /* OESTextureFloat.cpp */,
15773
				6EBF0E4512A8926100DB1709 /* OESTextureFloat.cpp */,
15766
				6EBF0E4612A8926100DB1709 /* OESTextureFloat.h */,
15774
				6EBF0E4612A8926100DB1709 /* OESTextureFloat.h */,
15767
				6EBF0E4712A8926100DB1709 /* OESTextureFloat.idl */,
15775
				6EBF0E4712A8926100DB1709 /* OESTextureFloat.idl */,
15776
				A31C4E4C16E02AA6002F7957 /* OESTextureHalfFloat.cpp */,
15777
				A31C4E4E16E02AB4002F7957 /* OESTextureHalfFloat.h */,
15778
				A31C4E5016E02AC5002F7957 /* OESTextureHalfFloat.idl */,
15768
				77A17A6E12F28182004E02F6 /* OESVertexArrayObject.cpp */,
15779
				77A17A6E12F28182004E02F6 /* OESVertexArrayObject.cpp */,
15769
				77A17A6F12F28182004E02F6 /* OESVertexArrayObject.h */,
15780
				77A17A6F12F28182004E02F6 /* OESVertexArrayObject.h */,
15770
				77A17A7012F28182004E02F6 /* OESVertexArrayObject.idl */,
15781
				77A17A7012F28182004E02F6 /* OESVertexArrayObject.idl */,
Lines 19177-19182 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec7
19177
				9001787F12E0370700648462 /* JSOESStandardDerivatives.h */,
19188
				9001787F12E0370700648462 /* JSOESStandardDerivatives.h */,
19178
				6EBF0E7412A9868800DB1709 /* JSOESTextureFloat.cpp */,
19189
				6EBF0E7412A9868800DB1709 /* JSOESTextureFloat.cpp */,
19179
				6EBF0E7512A9868800DB1709 /* JSOESTextureFloat.h */,
19190
				6EBF0E7512A9868800DB1709 /* JSOESTextureFloat.h */,
19191
				A31C4E5116E02B08002F7957 /* JSOESTextureHalfFloat.cpp */,
19192
				A31C4E5316E02B40002F7957 /* JSOESTextureHalfFloat.h */,
19180
				77A17AA212F28B2A004E02F6 /* JSOESVertexArrayObject.cpp */,
19193
				77A17AA212F28B2A004E02F6 /* JSOESVertexArrayObject.cpp */,
19181
				77A17AA312F28B2A004E02F6 /* JSOESVertexArrayObject.h */,
19194
				77A17AA312F28B2A004E02F6 /* JSOESVertexArrayObject.h */,
19182
				B658FF9F1522EF3A00DD5595 /* JSRadioNodeList.cpp */,
19195
				B658FF9F1522EF3A00DD5595 /* JSRadioNodeList.cpp */,
Lines 26635-26641 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec8
26635
				FD537353137B651800008DCE /* ZeroPole.h in Headers */,
26648
				FD537353137B651800008DCE /* ZeroPole.h in Headers */,
26636
				41B8CD4616D04591000E8CC0 /* SelectorCheckerFastPath.h in Headers */,
26649
				41B8CD4616D04591000E8CC0 /* SelectorCheckerFastPath.h in Headers */,
26637
				49140257168E02EC002D6C6A /* TimelineTraceEventProcessor.h in Headers */,
26650
				49140257168E02EC002D6C6A /* TimelineTraceEventProcessor.h in Headers */,
26638
                                A024575216CEAA27000E5671 /* EXTDrawBuffers.h in Headers */,
26651
				A024575216CEAA27000E5671 /* EXTDrawBuffers.h in Headers */,
26652
				A31C4E4F16E02AB4002F7957 /* OESTextureHalfFloat.h in Headers */,
26653
				A31C4E5416E02B40002F7957 /* JSOESTextureHalfFloat.h in Headers */,
26639
			);
26654
			);
26640
			runOnlyForDeploymentPostprocessing = 0;
26655
			runOnlyForDeploymentPostprocessing = 0;
26641
		};
26656
		};
Lines 29831-29837 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec9
29831
				41B8CD4516D04591000E8CC0 /* SelectorCheckerFastPath.cpp in Sources */,
29846
				41B8CD4516D04591000E8CC0 /* SelectorCheckerFastPath.cpp in Sources */,
29832
				49140256168E02E8002D6C6A /* TimelineTraceEventProcessor.cpp in Sources */,
29847
				49140256168E02E8002D6C6A /* TimelineTraceEventProcessor.cpp in Sources */,
29833
				E14A94D716DFDF950068DE82 /* BlobRegistry.cpp in Sources */,
29848
				E14A94D716DFDF950068DE82 /* BlobRegistry.cpp in Sources */,
29834
                                A024575116CEAA27000E5671 /* EXTDrawBuffers.cpp in Sources */,
29849
				A024575116CEAA27000E5671 /* EXTDrawBuffers.cpp in Sources */,
29850
				A31C4E4D16E02AA6002F7957 /* OESTextureHalfFloat.cpp in Sources */,
29851
				A31C4E5216E02B08002F7957 /* JSOESTextureHalfFloat.cpp in Sources */,
29835
			);
29852
			);
29836
			runOnlyForDeploymentPostprocessing = 0;
29853
			runOnlyForDeploymentPostprocessing = 0;
29837
		};
29854
		};
- a/Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp +4 lines
Lines 44-49 a/Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp_sec1
44
#include "JSOESElementIndexUint.h"
44
#include "JSOESElementIndexUint.h"
45
#include "JSOESStandardDerivatives.h"
45
#include "JSOESStandardDerivatives.h"
46
#include "JSOESTextureFloat.h"
46
#include "JSOESTextureFloat.h"
47
#include "JSOESTextureHalfFloat.h"
47
#include "JSOESVertexArrayObject.h"
48
#include "JSOESVertexArrayObject.h"
48
#include "JSUint32Array.h"
49
#include "JSUint32Array.h"
49
#include "JSUint8Array.h"
50
#include "JSUint8Array.h"
Lines 63-68 a/Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp_sec2
63
#include "OESElementIndexUint.h"
64
#include "OESElementIndexUint.h"
64
#include "OESStandardDerivatives.h"
65
#include "OESStandardDerivatives.h"
65
#include "OESTextureFloat.h"
66
#include "OESTextureFloat.h"
67
#include "OESTextureHalfFloat.h"
66
#include "OESVertexArrayObject.h"
68
#include "OESVertexArrayObject.h"
67
#include "WebGLBuffer.h"
69
#include "WebGLBuffer.h"
68
#include "WebGLCompressedTextureS3TC.h"
70
#include "WebGLCompressedTextureS3TC.h"
Lines 204-209 static JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, WebGLExten a/Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp_sec3
204
        return toJS(exec, globalObject, static_cast<OESStandardDerivatives*>(extension));
206
        return toJS(exec, globalObject, static_cast<OESStandardDerivatives*>(extension));
205
    case WebGLExtension::OESTextureFloatName:
207
    case WebGLExtension::OESTextureFloatName:
206
        return toJS(exec, globalObject, static_cast<OESTextureFloat*>(extension));
208
        return toJS(exec, globalObject, static_cast<OESTextureFloat*>(extension));
209
    case WebGLExtension::OESTextureHalfFloatName:
210
        return toJS(exec, globalObject, static_cast<OESTextureHalfFloat*>(extension));
207
    case WebGLExtension::OESVertexArrayObjectName:
211
    case WebGLExtension::OESVertexArrayObjectName:
208
        return toJS(exec, globalObject, static_cast<OESVertexArrayObject*>(extension));
212
        return toJS(exec, globalObject, static_cast<OESVertexArrayObject*>(extension));
209
    case WebGLExtension::OESElementIndexUintName:
213
    case WebGLExtension::OESElementIndexUintName:
- a/Source/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp +5 lines
Lines 51-56 a/Source/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp_sec1
51
#include "V8OESElementIndexUint.h"
51
#include "V8OESElementIndexUint.h"
52
#include "V8OESStandardDerivatives.h"
52
#include "V8OESStandardDerivatives.h"
53
#include "V8OESTextureFloat.h"
53
#include "V8OESTextureFloat.h"
54
#include "V8OESTextureHalfFloat.h"
54
#include "V8OESVertexArrayObject.h"
55
#include "V8OESVertexArrayObject.h"
55
#include "V8Uint16Array.h"
56
#include "V8Uint16Array.h"
56
#include "V8Uint32Array.h"
57
#include "V8Uint32Array.h"
Lines 193-198 static v8::Handle<v8::Value> toV8Object(WebGLExtension* extension, v8::Handle<v8 a/Source/WebCore/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp_sec2
193
        extensionObject = toV8(static_cast<OESTextureFloat*>(extension), contextObject, isolate);
194
        extensionObject = toV8(static_cast<OESTextureFloat*>(extension), contextObject, isolate);
194
        referenceName = "oesTextureFloatName";
195
        referenceName = "oesTextureFloatName";
195
        break;
196
        break;
197
    case WebGLExtension::OESTextureHalfFloatName:
198
        extensionObject = toV8(static_cast<OESTextureHalfFloat*>(extension), contextObject, isolate);
199
        referenceName = "oesTextureHalfFloatName";
200
        break;
196
    case WebGLExtension::OESVertexArrayObjectName:
201
    case WebGLExtension::OESVertexArrayObjectName:
197
        extensionObject = toV8(static_cast<OESVertexArrayObject*>(extension), contextObject, isolate);
202
        extensionObject = toV8(static_cast<OESVertexArrayObject*>(extension), contextObject, isolate);
198
        referenceName = "oesVertexArrayObjectName";
203
        referenceName = "oesVertexArrayObjectName";
- a/Source/WebCore/html/canvas/OESTextureHalfFloat.cpp +55 lines
Line 0 a/Source/WebCore/html/canvas/OESTextureHalfFloat.cpp_sec1
1
/*
2
 * Copyright (C) 2013 Motorola Mobility LLC. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 *
8
 * 1.  Redistributions of source code must retain the above copyright
9
 *     notice, this list of conditions and the following disclaimer.
10
 * 2.  Redistributions in binary form must reproduce the above copyright
11
 *     notice, this list of conditions and the following disclaimer in the
12
 *     documentation and/or other materials provided with the distribution.
13
 *
14
 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
15
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17
 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
18
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
#include "config.h"
27
28
#if ENABLE(WEBGL)
29
30
#include "OESTextureHalfFloat.h"
31
32
namespace WebCore {
33
34
OESTextureHalfFloat::OESTextureHalfFloat(WebGLRenderingContext* context)
35
    : WebGLExtension(context)
36
{
37
}
38
39
OESTextureHalfFloat::~OESTextureHalfFloat()
40
{
41
}
42
43
WebGLExtension::ExtensionName OESTextureHalfFloat::getName() const
44
{
45
    return OESTextureHalfFloatName;
46
}
47
48
PassOwnPtr<OESTextureHalfFloat> OESTextureHalfFloat::create(WebGLRenderingContext* context)
49
{
50
    return adoptPtr(new OESTextureHalfFloat(context));
51
}
52
53
} // namespace WebCore
54
55
#endif // ENABLE(WEBGL)
- a/Source/WebCore/html/canvas/OESTextureHalfFloat.h +47 lines
Line 0 a/Source/WebCore/html/canvas/OESTextureHalfFloat.h_sec1
1
/*
2
 * Copyright (C) 2013 Motorola Mobility LLC. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 *
8
 * 1.  Redistributions of source code must retain the above copyright
9
 *     notice, this list of conditions and the following disclaimer.
10
 * 2.  Redistributions in binary form must reproduce the above copyright
11
 *     notice, this list of conditions and the following disclaimer in the
12
 *     documentation and/or other materials provided with the distribution.
13
 *
14
 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
15
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17
 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
18
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
#ifndef OESTextureHalfFloat_h
27
#define OESTextureHalfFloat_h
28
29
#include "WebGLExtension.h"
30
#include <wtf/PassOwnPtr.h>
31
32
namespace WebCore {
33
34
class OESTextureHalfFloat : public WebGLExtension {
35
public:
36
    static PassOwnPtr<OESTextureHalfFloat> create(WebGLRenderingContext*);
37
38
    virtual ~OESTextureHalfFloat();
39
    virtual ExtensionName getName() const;
40
41
private:
42
    OESTextureHalfFloat(WebGLRenderingContext*);
43
};
44
45
} // namespace WebCore
46
47
#endif // OESTextureHalfFloat_h
- a/Source/WebCore/html/canvas/OESTextureHalfFloat.idl +31 lines
Line 0 a/Source/WebCore/html/canvas/OESTextureHalfFloat.idl_sec1
1
/*
2
 * Copyright (C) 2013 Motorola Mobility LLC. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 *
8
 * 1.  Redistributions of source code must retain the above copyright
9
 *     notice, this list of conditions and the following disclaimer.
10
 * 2.  Redistributions in binary form must reproduce the above copyright
11
 *     notice, this list of conditions and the following disclaimer in the
12
 *     documentation and/or other materials provided with the distribution.
13
 *
14
 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
15
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17
 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
18
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
[
27
    Conditional=WEBGL,
28
    JSGenerateIsReachable=ImplContext,
29
    OmitConstructor
30
] interface OESTextureHalfFloat {
31
};
- a/Source/WebCore/html/canvas/WebGLExtension.h +1 lines
Lines 39-44 public: a/Source/WebCore/html/canvas/WebGLExtension.h_sec1
39
        EXTDrawBuffersName,
39
        EXTDrawBuffersName,
40
        EXTTextureFilterAnisotropicName,
40
        EXTTextureFilterAnisotropicName,
41
        OESTextureFloatName,
41
        OESTextureFloatName,
42
        OESTextureHalfFloatName,
42
        OESStandardDerivativesName,
43
        OESStandardDerivativesName,
43
        OESVertexArrayObjectName,
44
        OESVertexArrayObjectName,
44
        WebGLDebugRendererInfoName,
45
        WebGLDebugRendererInfoName,
- a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp -3 / +82 lines
Lines 49-54 a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp_sec1
49
#include "OESElementIndexUint.h"
49
#include "OESElementIndexUint.h"
50
#include "OESStandardDerivatives.h"
50
#include "OESStandardDerivatives.h"
51
#include "OESTextureFloat.h"
51
#include "OESTextureFloat.h"
52
#include "OESTextureHalfFloat.h"
52
#include "OESVertexArrayObject.h"
53
#include "OESVertexArrayObject.h"
53
#include "Page.h"
54
#include "Page.h"
54
#include "RenderBox.h"
55
#include "RenderBox.h"
Lines 2382-2387 WebGLExtension* WebGLRenderingContext::getExtension(const String& name) a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp_sec2
2382
        }
2383
        }
2383
        return m_oesTextureFloat.get();
2384
        return m_oesTextureFloat.get();
2384
    }
2385
    }
2386
    if (equalIgnoringCase(name, "OES_texture_half_float")
2387
        && m_context->getExtensions()->supports("GL_OES_texture_half_float")) {
2388
        if (!m_oesTextureHalfFloat) {
2389
            m_context->getExtensions()->ensureEnabled("GL_OES_texture_half_float");
2390
            m_oesTextureHalfFloat = OESTextureHalfFloat::create(this);
2391
        }
2392
        return m_oesTextureHalfFloat.get();
2393
    }
2385
    if (equalIgnoringCase(name, "OES_vertex_array_object")
2394
    if (equalIgnoringCase(name, "OES_vertex_array_object")
2386
        && m_context->getExtensions()->supports("GL_OES_vertex_array_object")) {
2395
        && m_context->getExtensions()->supports("GL_OES_vertex_array_object")) {
2387
        if (!m_oesVertexArrayObject) {
2396
        if (!m_oesVertexArrayObject) {
Lines 3767-3772 void WebGLRenderingContext::texImage2D(GC3Denum target, GC3Dint level, GC3Denum a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp_sec3
3767
        return;
3776
        return;
3768
    if (!validateSettableTexFormat("texImage2D", format))
3777
    if (!validateSettableTexFormat("texImage2D", format))
3769
        return;
3778
        return;
3779
    // FIXME: Uploading ImageData to half floating point texture is not supported yet
3780
    // https://bugs.webkit.org/show_bug.cgi?id=110936
3781
    if (type == GraphicsContext3D::HALF_FLOAT_OES) {
3782
        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "texImage2D", "Operation not supported yet");
3783
        return;
3784
    }
3785
3770
    bool needConversion = true;
3786
    bool needConversion = true;
3771
    // The data from ImageData is always of format RGBA8.
3787
    // The data from ImageData is always of format RGBA8.
3772
    // No conversion is needed if destination format is RGBA and type is USIGNED_BYTE and no Flip or Premultiply operation is required.
3788
    // No conversion is needed if destination format is RGBA and type is USIGNED_BYTE and no Flip or Premultiply operation is required.
Lines 3797-3802 void WebGLRenderingContext::texImage2D(GC3Denum target, GC3Dint level, GC3Denum a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp_sec4
3797
        ec = SECURITY_ERR;
3813
        ec = SECURITY_ERR;
3798
        return;
3814
        return;
3799
    }
3815
    }
3816
    // Uploading ImageElement to half floating point texture is not supported yet
3817
    // https://bugs.webkit.org/show_bug.cgi?id=111194
3818
    if (type == GraphicsContext3D::HALF_FLOAT_OES) {
3819
        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "texImage2D", "Operation not supported yet");
3820
        return;
3821
    }
3800
3822
3801
    texImage2DImpl(target, level, internalformat, format, type, image->cachedImage()->imageForRenderer(image->renderer()), GraphicsContext3D::HtmlDomImage, m_unpackFlipY, m_unpackPremultiplyAlpha, ec);
3823
    texImage2DImpl(target, level, internalformat, format, type, image->cachedImage()->imageForRenderer(image->renderer()), GraphicsContext3D::HtmlDomImage, m_unpackFlipY, m_unpackPremultiplyAlpha, ec);
3802
}
3824
}
Lines 3819-3824 void WebGLRenderingContext::texImage2D(GC3Denum target, GC3Dint level, GC3Denum a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp_sec5
3819
        return;
3841
        return;
3820
    if (!validateSettableTexFormat("texImage2D", format))
3842
    if (!validateSettableTexFormat("texImage2D", format))
3821
        return;
3843
        return;
3844
    // Uploading HTMLCanvasElement to half floating point texture is not supported yet
3845
    // https://bugs.webkit.org/show_bug.cgi?id=111196
3846
    if (type == GraphicsContext3D::HALF_FLOAT_OES) {
3847
        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "texImage2D", "Operation not supported yet");
3848
        return;
3849
    }
3822
3850
3823
    WebGLTexture* texture = validateTextureBinding("texImage2D", target, true);
3851
    WebGLTexture* texture = validateTextureBinding("texImage2D", target, true);
3824
    // If possible, copy from the canvas element directly to the texture
3852
    // If possible, copy from the canvas element directly to the texture
Lines 3875-3880 void WebGLRenderingContext::texImage2D(GC3Denum target, GC3Dint level, GC3Denum a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp_sec6
3875
    RefPtr<Image> image = videoFrameToImage(video, ImageBuffer::fastCopyImageMode(), ec);
3903
    RefPtr<Image> image = videoFrameToImage(video, ImageBuffer::fastCopyImageMode(), ec);
3876
    if (!image)
3904
    if (!image)
3877
        return;
3905
        return;
3906
    // Uploading HTMLVideoElement to half floating point texture is not supported yet
3907
    // https://bugs.webkit.org/show_bug.cgi?id=111197
3908
    if (type == GraphicsContext3D::HALF_FLOAT_OES) {
3909
        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "texImage2D", "Operation not supported yet");
3910
        return;
3911
    }
3912
3878
    texImage2DImpl(target, level, internalformat, format, type, image.get(), GraphicsContext3D::HtmlDomVideo, m_unpackFlipY, m_unpackPremultiplyAlpha, ec);
3913
    texImage2DImpl(target, level, internalformat, format, type, image.get(), GraphicsContext3D::HtmlDomVideo, m_unpackFlipY, m_unpackPremultiplyAlpha, ec);
3879
}
3914
}
3880
#endif
3915
#endif
Lines 4029-4034 void WebGLRenderingContext::texSubImage2D(GC3Denum target, GC3Dint level, GC3Din a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp_sec7
4029
        return;
4064
        return;
4030
    if (!validateSettableTexFormat("texSubImage2D", format))
4065
    if (!validateSettableTexFormat("texSubImage2D", format))
4031
        return;
4066
        return;
4067
    // Uploading ImageData to half floating point texture is not supported yet
4068
    // https://bugs.webkit.org/show_bug.cgi?id=110936
4069
    if (type == GraphicsContext3D::HALF_FLOAT_OES) {
4070
        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "texSubImage2D", "Operation not supported yet");
4071
        return;
4072
    }
4073
4032
    Vector<uint8_t> data;
4074
    Vector<uint8_t> data;
4033
    bool needConversion = true;
4075
    bool needConversion = true;
4034
    // The data from ImageData is always of format RGBA8.
4076
    // The data from ImageData is always of format RGBA8.
Lines 4060-4065 void WebGLRenderingContext::texSubImage2D(GC3Denum target, GC3Dint level, GC3Din a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp_sec8
4060
        ec = SECURITY_ERR;
4102
        ec = SECURITY_ERR;
4061
        return;
4103
        return;
4062
    }
4104
    }
4105
    // Uploading HTMLImageElement to half floating point texture is not supported yet
4106
    // https://bugs.webkit.org/show_bug.cgi?id=111194
4107
    if (type == GraphicsContext3D::HALF_FLOAT_OES) {
4108
        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "texSubImage2D", "Operation not supported yet");
4109
        return;
4110
    }
4111
4063
    texSubImage2DImpl(target, level, xoffset, yoffset, format, type, image->cachedImage()->imageForRenderer(image->renderer()), GraphicsContext3D::HtmlDomImage, m_unpackFlipY, m_unpackPremultiplyAlpha, ec);
4112
    texSubImage2DImpl(target, level, xoffset, yoffset, format, type, image->cachedImage()->imageForRenderer(image->renderer()), GraphicsContext3D::HtmlDomImage, m_unpackFlipY, m_unpackPremultiplyAlpha, ec);
4064
}
4113
}
4065
4114
Lines 4081-4086 void WebGLRenderingContext::texSubImage2D(GC3Denum target, GC3Dint level, GC3Din a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp_sec9
4081
        return;
4130
        return;
4082
    if (!validateSettableTexFormat("texSubImage2D", format))
4131
    if (!validateSettableTexFormat("texSubImage2D", format))
4083
        return;
4132
        return;
4133
    // Uploading HTMLCanvasElement to half floating point texture is not supported yet
4134
    // https://bugs.webkit.org/show_bug.cgi?id=111196
4135
    if (type == GraphicsContext3D::HALF_FLOAT_OES) {
4136
        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "texSubImage2D", "Operation not supported yet");
4137
        return;
4138
    }
4139
4084
    RefPtr<ImageData> imageData = canvas->getImageData();
4140
    RefPtr<ImageData> imageData = canvas->getImageData();
4085
    if (imageData)
4141
    if (imageData)
4086
        texSubImage2D(target, level, xoffset, yoffset, format, type, imageData.get(), ec);
4142
        texSubImage2D(target, level, xoffset, yoffset, format, type, imageData.get(), ec);
Lines 4098-4103 void WebGLRenderingContext::texSubImage2D(GC3Denum target, GC3Dint level, GC3Din a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp_sec10
4098
    RefPtr<Image> image = videoFrameToImage(video, ImageBuffer::fastCopyImageMode(), ec);
4154
    RefPtr<Image> image = videoFrameToImage(video, ImageBuffer::fastCopyImageMode(), ec);
4099
    if (!image)
4155
    if (!image)
4100
        return;
4156
        return;
4157
    // Uploading HTMLVideoElement to half floating point texture is not supported yet
4158
    // https://bugs.webkit.org/show_bug.cgi?id=111197
4159
    if (type == GraphicsContext3D::HALF_FLOAT_OES) {
4160
        synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, "texSubImage2D", "Operation not supported yet");
4161
        return;
4162
    }
4163
4101
    texSubImage2DImpl(target, level, xoffset, yoffset, format, type, image.get(), GraphicsContext3D::HtmlDomVideo, m_unpackFlipY, m_unpackPremultiplyAlpha, ec);
4164
    texSubImage2DImpl(target, level, xoffset, yoffset, format, type, image.get(), GraphicsContext3D::HtmlDomVideo, m_unpackFlipY, m_unpackPremultiplyAlpha, ec);
4102
}
4165
}
4103
#endif
4166
#endif
Lines 4980-4985 bool WebGLRenderingContext::validateTexFuncFormatAndType(const char* functionNam a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp_sec11
4980
            break;
5043
            break;
4981
        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, functionName, "invalid texture type");
5044
        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, functionName, "invalid texture type");
4982
        return false;
5045
        return false;
5046
    case GraphicsContext3D::HALF_FLOAT_OES:
5047
        if (m_oesTextureHalfFloat)
5048
            break;
5049
        synthesizeGLError(GraphicsContext3D::INVALID_ENUM, functionName, "invalid texture type");
5050
        return false;
4983
    case GraphicsContext3D::UNSIGNED_INT:
5051
    case GraphicsContext3D::UNSIGNED_INT:
4984
    case GraphicsContext3D::UNSIGNED_INT_24_8:
5052
    case GraphicsContext3D::UNSIGNED_INT_24_8:
4985
    case GraphicsContext3D::UNSIGNED_SHORT:
5053
    case GraphicsContext3D::UNSIGNED_SHORT:
Lines 4998-5004 bool WebGLRenderingContext::validateTexFuncFormatAndType(const char* functionNam a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp_sec12
4998
    case GraphicsContext3D::LUMINANCE:
5066
    case GraphicsContext3D::LUMINANCE:
4999
    case GraphicsContext3D::LUMINANCE_ALPHA:
5067
    case GraphicsContext3D::LUMINANCE_ALPHA:
5000
        if (type != GraphicsContext3D::UNSIGNED_BYTE
5068
        if (type != GraphicsContext3D::UNSIGNED_BYTE
5001
            && type != GraphicsContext3D::FLOAT) {
5069
            && type != GraphicsContext3D::FLOAT
5070
            && type != GraphicsContext3D::HALF_FLOAT_OES) {
5002
            synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, functionName, "invalid type for format");
5071
            synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, functionName, "invalid type for format");
5003
            return false;
5072
            return false;
5004
        }
5073
        }
Lines 5006-5012 bool WebGLRenderingContext::validateTexFuncFormatAndType(const char* functionNam a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp_sec13
5006
    case GraphicsContext3D::RGB:
5075
    case GraphicsContext3D::RGB:
5007
        if (type != GraphicsContext3D::UNSIGNED_BYTE
5076
        if (type != GraphicsContext3D::UNSIGNED_BYTE
5008
            && type != GraphicsContext3D::UNSIGNED_SHORT_5_6_5
5077
            && type != GraphicsContext3D::UNSIGNED_SHORT_5_6_5
5009
            && type != GraphicsContext3D::FLOAT) {
5078
            && type != GraphicsContext3D::FLOAT
5079
            && type != GraphicsContext3D::HALF_FLOAT_OES) {
5010
            synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, functionName, "invalid type for RGB format");
5080
            synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, functionName, "invalid type for RGB format");
5011
            return false;
5081
            return false;
5012
        }
5082
        }
Lines 5015-5021 bool WebGLRenderingContext::validateTexFuncFormatAndType(const char* functionNam a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp_sec14
5015
        if (type != GraphicsContext3D::UNSIGNED_BYTE
5085
        if (type != GraphicsContext3D::UNSIGNED_BYTE
5016
            && type != GraphicsContext3D::UNSIGNED_SHORT_4_4_4_4
5086
            && type != GraphicsContext3D::UNSIGNED_SHORT_4_4_4_4
5017
            && type != GraphicsContext3D::UNSIGNED_SHORT_5_5_5_1
5087
            && type != GraphicsContext3D::UNSIGNED_SHORT_5_5_5_1
5018
            && type != GraphicsContext3D::FLOAT) {
5088
            && type != GraphicsContext3D::FLOAT
5089
            && type != GraphicsContext3D::HALF_FLOAT_OES) {
5019
            synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, functionName, "invalid type for RGBA format");
5090
            synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, functionName, "invalid type for RGBA format");
5020
            return false;
5091
            return false;
5021
        }
5092
        }
Lines 5185-5190 bool WebGLRenderingContext::validateTexFuncData(const char* functionName, GC3Din a/Source/WebCore/html/canvas/WebGLRenderingContext.cpp_sec15
5185
            return false;
5256
            return false;
5186
        }
5257
        }
5187
        break;
5258
        break;
5259
    case GraphicsContext3D::HALF_FLOAT_OES: // OES_texture_half_float
5260
        // As per the specification, ArrayBufferView should be null when
5261
        // OES_texture_half_float is enabled.
5262
        if (pixels) {
5263
            synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, functionName, "type HALF_FLOAT_OES but ArrayBufferView is not NULL");
5264
            return false;
5265
        }
5266
        break;
5188
    default:
5267
    default:
5189
        ASSERT_NOT_REACHED();
5268
        ASSERT_NOT_REACHED();
5190
    }
5269
    }
- a/Source/WebCore/html/canvas/WebGLRenderingContext.h +2 lines
Lines 51-56 class ImageData; a/Source/WebCore/html/canvas/WebGLRenderingContext.h_sec1
51
class IntSize;
51
class IntSize;
52
class OESStandardDerivatives;
52
class OESStandardDerivatives;
53
class OESTextureFloat;
53
class OESTextureFloat;
54
class OESTextureHalfFloat;
54
class OESVertexArrayObject;
55
class OESVertexArrayObject;
55
class OESElementIndexUint;
56
class OESElementIndexUint;
56
class WebGLActiveInfo;
57
class WebGLActiveInfo;
Lines 517-522 public: a/Source/WebCore/html/canvas/WebGLRenderingContext.h_sec2
517
    OwnPtr<EXTDrawBuffers> m_extDrawBuffers;
518
    OwnPtr<EXTDrawBuffers> m_extDrawBuffers;
518
    OwnPtr<EXTTextureFilterAnisotropic> m_extTextureFilterAnisotropic;
519
    OwnPtr<EXTTextureFilterAnisotropic> m_extTextureFilterAnisotropic;
519
    OwnPtr<OESTextureFloat> m_oesTextureFloat;
520
    OwnPtr<OESTextureFloat> m_oesTextureFloat;
521
    OwnPtr<OESTextureHalfFloat> m_oesTextureHalfFloat;
520
    OwnPtr<OESStandardDerivatives> m_oesStandardDerivatives;
522
    OwnPtr<OESStandardDerivatives> m_oesStandardDerivatives;
521
    OwnPtr<OESVertexArrayObject> m_oesVertexArrayObject;
523
    OwnPtr<OESVertexArrayObject> m_oesVertexArrayObject;
522
    OwnPtr<OESElementIndexUint> m_oesElementIndexUint;
524
    OwnPtr<OESElementIndexUint> m_oesElementIndexUint;
- a/Source/WebCore/html/canvas/WebGLRenderingContext.idl -1 / +2 lines
Lines 1-4 a/Source/WebCore/html/canvas/WebGLRenderingContext.idl_sec1
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
Lines 237-242 typedef /*unrestricted*/ float GLclampf; a/Source/WebCore/html/canvas/WebGLRenderingContext.idl_sec2
237
    const GLenum INT                            = 0x1404;
237
    const GLenum INT                            = 0x1404;
238
    const GLenum UNSIGNED_INT                   = 0x1405;
238
    const GLenum UNSIGNED_INT                   = 0x1405;
239
    const GLenum FLOAT                          = 0x1406;
239
    const GLenum FLOAT                          = 0x1406;
240
    const GLenum HALF_FLOAT_OES                 = 0x8D61;
240
241
241
    /* PixelFormat */
242
    /* PixelFormat */
242
    const GLenum DEPTH_COMPONENT                = 0x1902;
243
    const GLenum DEPTH_COMPONENT                = 0x1902;
- a/Source/WebCore/platform/graphics/Extensions3D.h +1 lines
Lines 53-58 public: a/Source/WebCore/platform/graphics/Extensions3D.h_sec1
53
    //   GL_EXT_packed_depth_stencil / GL_OES_packed_depth_stencil
53
    //   GL_EXT_packed_depth_stencil / GL_OES_packed_depth_stencil
54
    //   GL_ANGLE_framebuffer_blit / GL_ANGLE_framebuffer_multisample
54
    //   GL_ANGLE_framebuffer_blit / GL_ANGLE_framebuffer_multisample
55
    //   GL_OES_texture_float
55
    //   GL_OES_texture_float
56
    //   GL_OES_texture_half_float
56
    //   GL_OES_standard_derivatives
57
    //   GL_OES_standard_derivatives
57
    //   GL_OES_rgb8_rgba8
58
    //   GL_OES_rgb8_rgba8
58
    //   GL_OES_vertex_array_object
59
    //   GL_OES_vertex_array_object
- a/Source/WebCore/platform/graphics/GraphicsContext3D.cpp +3 lines
Lines 176-181 bool GraphicsContext3D::computeFormatAndTypeParameters(GC3Denum format, a/Source/WebCore/platform/graphics/GraphicsContext3D.cpp_sec1
176
    case GraphicsContext3D::FLOAT: // OES_texture_float
176
    case GraphicsContext3D::FLOAT: // OES_texture_float
177
        *bytesPerComponent = sizeof(GC3Dfloat);
177
        *bytesPerComponent = sizeof(GC3Dfloat);
178
        break;
178
        break;
179
    case GraphicsContext3D::HALF_FLOAT_OES: // OES_texture_half_float
180
        *bytesPerComponent = sizeof(GC3Dhalffloat);
181
        break;
179
    default:
182
    default:
180
        return false;
183
        return false;
181
    }
184
    }
- a/Source/WebCore/platform/graphics/GraphicsContext3D.h +1 lines
Lines 251-256 public: a/Source/WebCore/platform/graphics/GraphicsContext3D.h_sec1
251
        INT = 0x1404,
251
        INT = 0x1404,
252
        UNSIGNED_INT = 0x1405,
252
        UNSIGNED_INT = 0x1405,
253
        FLOAT = 0x1406,
253
        FLOAT = 0x1406,
254
        HALF_FLOAT_OES = 0x8D61,
254
        FIXED = 0x140C,
255
        FIXED = 0x140C,
255
        DEPTH_COMPONENT = 0x1902,
256
        DEPTH_COMPONENT = 0x1902,
256
        ALPHA = 0x1906,
257
        ALPHA = 0x1906,
- a/Source/WebCore/platform/graphics/GraphicsTypes3D.h +1 lines
Lines 41-46 typedef int GC3Dint; a/Source/WebCore/platform/graphics/GraphicsTypes3D.h_sec1
41
typedef int GC3Dsizei;
41
typedef int GC3Dsizei;
42
typedef unsigned int GC3Duint;
42
typedef unsigned int GC3Duint;
43
typedef float GC3Dfloat;
43
typedef float GC3Dfloat;
44
typedef unsigned short GC3Dhalffloat;
44
typedef float GC3Dclampf;
45
typedef float GC3Dclampf;
45
typedef intptr_t GC3Dintptr;
46
typedef intptr_t GC3Dintptr;
46
typedef intptr_t GC3Dsizeiptr;
47
typedef intptr_t GC3Dsizeiptr;
- a/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp -1 / +12 lines
Lines 256-263 bool GraphicsContext3D::texImage2D(GC3Denum target, GC3Dint level, GC3Denum inte a/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp_sec1
256
            openGLInternalFormat = GL_RGBA32F_ARB;
256
            openGLInternalFormat = GL_RGBA32F_ARB;
257
        else if (format == GL_RGB)
257
        else if (format == GL_RGB)
258
            openGLInternalFormat = GL_RGB32F_ARB;
258
            openGLInternalFormat = GL_RGB32F_ARB;
259
    } else if (type == HALF_FLOAT_OES) {
260
        if (format == GL_RGBA)
261
            openGLInternalFormat = GL_RGBA16F_ARB;
262
        else if (format == GL_RGB)
263
            openGLInternalFormat = GL_RGB16F_ARB;
264
        else if (format == GL_LUMINANCE)
265
            openGLInternalFormat = GL_LUMINANCE16F_ARB;
266
        else if (format == GL_ALPHA)
267
            openGLInternalFormat = GL_ALPHA16F_ARB;
268
        else if (format == GL_LUMINANCE_ALPHA)
269
            openGLInternalFormat = GL_LUMINANCE_ALPHA16F_ARB;
270
        type = FLOAT;
259
    }
271
    }
260
261
    texImage2DDirect(target, level, openGLInternalFormat, width, height, border, format, type, pixels);
272
    texImage2DDirect(target, level, openGLInternalFormat, width, height, border, format, type, pixels);
262
    return true;
273
    return true;
263
}
274
}
- a/LayoutTests/ChangeLog +34 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2013-02-28  Nayan Kumar K  <nayankk@motorola.com>
2
3
        [WebGL] Support for texImage2D of type HALF_FLOAT_OES with ArrayBufferView.
4
        https://bugs.webkit.org/show_bug.cgi?id=110818
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        As per OES_texture_half_float specification texImage2D and texSubImage2D entry
9
        points taking ArrayBufferView should extended to accept null with the pixel type
10
        HALF_FLOAT_OES.
11
12
        * fast/canvas/webgl/constants.html:
13
        * fast/canvas/webgl/oes-texture-half-float-expected.txt: Added.
14
        * fast/canvas/webgl/oes-texture-half-float-not-supported-expected.txt: Added.
15
        * fast/canvas/webgl/oes-texture-half-float-not-supported.html: Added.
16
        * fast/canvas/webgl/oes-texture-half-float.html: Added.
17
1
2013-03-01  Chris Fleizach  <cfleizach@apple.com>
18
2013-03-01  Chris Fleizach  <cfleizach@apple.com>
2
19
3
        AX: Upstream iOS Accessibility layout tests
20
        AX: Upstream iOS Accessibility layout tests
Lines 120-125 a/LayoutTests/ChangeLog_sec2
120
137
121
        * platform/chromium/TestExpectations:
138
        * platform/chromium/TestExpectations:
122
139
140
2013-02-28  Nayan Kumar K  <nayankk@motorola.com>
141
142
        [WebGL] Support for texImage2D of type HALF_FLOAT_OES with ArrayBufferView.
143
        https://bugs.webkit.org/show_bug.cgi?id=110818
144
145
        Reviewed by NOBODY (OOPS!).
146
147
        As per OES_texture_half_float specification texImage2D and texSubImage2D entry
148
        points taking ArrayBufferView should extended to accept null with the pixel type
149
        HALF_FLOAT_OES.
150
151
        * fast/canvas/webgl/constants.html:
152
        * fast/canvas/webgl/oes-texture-half-float-expected.txt: Added.
153
        * fast/canvas/webgl/oes-texture-half-float-not-supported-expected.txt: Added.
154
        * fast/canvas/webgl/oes-texture-half-float-not-supported.html: Added.
155
        * fast/canvas/webgl/oes-texture-half-float.html: Added.
156
123
2013-03-01  Vsevolod Vlasov  <vsevik@chromium.org>
157
2013-03-01  Vsevolod Vlasov  <vsevik@chromium.org>
124
158
125
        Web Inspector: Navigator should show tree element for each folder in the source path.
159
        Web Inspector: Navigator should show tree element for each folder in the source path.
- a/LayoutTests/fast/canvas/webgl/constants.html +1 lines
Lines 212-217 UNSIGNED_SHORT : 0x1403, a/LayoutTests/fast/canvas/webgl/constants.html_sec1
212
INT                            : 0x1404,
212
INT                            : 0x1404,
213
UNSIGNED_INT                   : 0x1405,
213
UNSIGNED_INT                   : 0x1405,
214
FLOAT                          : 0x1406,
214
FLOAT                          : 0x1406,
215
HALF_FLOAT_OES                 : 0x8D61,
215
    
216
    
216
    /* PixelFormat */
217
    /* PixelFormat */
217
DEPTH_COMPONENT                : 0x1902,
218
DEPTH_COMPONENT                : 0x1902,
- a/LayoutTests/fast/canvas/webgl/oes-texture-half-float-expected.txt +84 lines
Line 0 a/LayoutTests/fast/canvas/webgl/oes-texture-half-float-expected.txt_sec1
1
This test verifies the functionality of OES_texture_half_float with null/non-null ArrayBufferView
2
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6
PASS WebGL context exists
7
Testing texture creation with extension disabled, format RGBA, and data null. Expect Failure
8
PASS getError was expected value: NO_ERROR : texture parameter setup should succeed
9
PASS getError was expected value: INVALID_ENUM : Half floating point texture must be diallowed if OES_texture_half_float isn't enabled
10
PASS Successfully enabled OES_texture_half_float extension
11
Testing texture creation with extension enabled, format RGBA, and data null. Expect Success
12
PASS getError was expected value: NO_ERROR : texture parameter setup should succeed
13
PASS getError was expected value: NO_ERROR : Half floating point texture allocation should succeed if OES_texture_half_float is enabled
14
Testing texture creation with extension enabled, format RGB, and data null. Expect Success
15
PASS getError was expected value: NO_ERROR : texture parameter setup should succeed
16
PASS getError was expected value: NO_ERROR : Half floating point texture allocation should succeed if OES_texture_half_float is enabled
17
Testing texture creation with extension enabled, format LUMINANCE, and data null. Expect Success
18
PASS getError was expected value: NO_ERROR : texture parameter setup should succeed
19
PASS getError was expected value: NO_ERROR : Half floating point texture allocation should succeed if OES_texture_half_float is enabled
20
Testing texture creation with extension enabled, format ALPHA, and data null. Expect Success
21
PASS getError was expected value: NO_ERROR : texture parameter setup should succeed
22
PASS getError was expected value: NO_ERROR : Half floating point texture allocation should succeed if OES_texture_half_float is enabled
23
Testing texture creation with extension enabled, format LUMINANCE_ALPHA, and data null. Expect Success
24
PASS getError was expected value: NO_ERROR : texture parameter setup should succeed
25
PASS getError was expected value: NO_ERROR : Half floating point texture allocation should succeed if OES_texture_half_float is enabled
26
Testing texture creation with extension enabled, format RGBA, and data non-null. Expect Failure
27
PASS getError was expected value: NO_ERROR : texture parameter setup should succeed
28
PASS getError was expected value: INVALID_OPERATION : Half floating point texture allocation must be diallowed when ArrayBufferView is not-null
29
Testing texture creation with extension enabled, format RGBA, and data non-null. Expect Failure
30
PASS getError was expected value: NO_ERROR : texture parameter setup should succeed
31
PASS getError was expected value: INVALID_OPERATION : Half floating point texture allocation must be diallowed when ArrayBufferView is not-null
32
Testing texture creation with extension enabled, format RGBA, and data non-null. Expect Failure
33
PASS getError was expected value: NO_ERROR : texture parameter setup should succeed
34
PASS getError was expected value: INVALID_OPERATION : Half floating point texture allocation must be diallowed when ArrayBufferView is not-null
35
Testing texture creation with extension enabled, format RGB, and data non-null. Expect Failure
36
PASS getError was expected value: NO_ERROR : texture parameter setup should succeed
37
PASS getError was expected value: INVALID_OPERATION : Half floating point texture allocation must be diallowed when ArrayBufferView is not-null
38
Testing texture creation with extension enabled, format RGB, and data non-null. Expect Failure
39
PASS getError was expected value: NO_ERROR : texture parameter setup should succeed
40
PASS getError was expected value: INVALID_OPERATION : Half floating point texture allocation must be diallowed when ArrayBufferView is not-null
41
Testing texture creation with extension enabled, format RGB, and data non-null. Expect Failure
42
PASS getError was expected value: NO_ERROR : texture parameter setup should succeed
43
PASS getError was expected value: INVALID_OPERATION : Half floating point texture allocation must be diallowed when ArrayBufferView is not-null
44
Testing texture creation with extension enabled, format LUMINANCE, and data non-null. Expect Failure
45
PASS getError was expected value: NO_ERROR : texture parameter setup should succeed
46
PASS getError was expected value: INVALID_OPERATION : Half floating point texture allocation must be diallowed when ArrayBufferView is not-null
47
Testing texture creation with extension enabled, format LUMINANCE, and data non-null. Expect Failure
48
PASS getError was expected value: NO_ERROR : texture parameter setup should succeed
49
PASS getError was expected value: INVALID_OPERATION : Half floating point texture allocation must be diallowed when ArrayBufferView is not-null
50
Testing texture creation with extension enabled, format LUMINANCE, and data non-null. Expect Failure
51
PASS getError was expected value: NO_ERROR : texture parameter setup should succeed
52
PASS getError was expected value: INVALID_OPERATION : Half floating point texture allocation must be diallowed when ArrayBufferView is not-null
53
Testing texture creation with extension enabled, format ALPHA, and data non-null. Expect Failure
54
PASS getError was expected value: NO_ERROR : texture parameter setup should succeed
55
PASS getError was expected value: INVALID_OPERATION : Half floating point texture allocation must be diallowed when ArrayBufferView is not-null
56
Testing texture creation with extension enabled, format ALPHA, and data non-null. Expect Failure
57
PASS getError was expected value: NO_ERROR : texture parameter setup should succeed
58
PASS getError was expected value: INVALID_OPERATION : Half floating point texture allocation must be diallowed when ArrayBufferView is not-null
59
Testing texture creation with extension enabled, format ALPHA, and data non-null. Expect Failure
60
PASS getError was expected value: NO_ERROR : texture parameter setup should succeed
61
PASS getError was expected value: INVALID_OPERATION : Half floating point texture allocation must be diallowed when ArrayBufferView is not-null
62
Testing texture creation with extension enabled, format LUMINANCE_ALPHA, and data non-null. Expect Failure
63
PASS getError was expected value: NO_ERROR : texture parameter setup should succeed
64
PASS getError was expected value: INVALID_OPERATION : Half floating point texture allocation must be diallowed when ArrayBufferView is not-null
65
Testing texture creation with extension enabled, format LUMINANCE_ALPHA, and data non-null. Expect Failure
66
PASS getError was expected value: NO_ERROR : texture parameter setup should succeed
67
PASS getError was expected value: INVALID_OPERATION : Half floating point texture allocation must be diallowed when ArrayBufferView is not-null
68
Testing texture creation with extension enabled, format LUMINANCE_ALPHA, and data non-null. Expect Failure
69
PASS getError was expected value: NO_ERROR : texture parameter setup should succeed
70
PASS getError was expected value: INVALID_OPERATION : Half floating point texture allocation must be diallowed when ArrayBufferView is not-null
71
72
Testing half floating point render target
73
PASS getError was expected value: NO_ERROR : texture parameter setup should succeed
74
PASS getError was expected value: NO_ERROR : Half floating point texture allocation should succeed if OES_texture_half_float is enabled
75
PASS getError was expected value: NO_ERROR : Rendering to half floating point texture should succeed
76
PASS getError was expected value: NO_ERROR : rendering from half floating point texture should succeed
77
PASS should be green
78
Testing that getExtension() returns the same object each time
79
PASS gl.getExtension("OES_texture_half_float").myProperty is 2
80
81
PASS successfullyParsed is true
82
83
TEST COMPLETE
84
- a/LayoutTests/fast/canvas/webgl/oes-texture-half-float-not-supported-expected.txt +40 lines
Line 0 a/LayoutTests/fast/canvas/webgl/oes-texture-half-float-not-supported-expected.txt_sec1
1
Testing not yet supported texture uploads
2
3
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6
7
PASS WebGL context exists
8
PASS Successfully enabled OES_texture_half_float extension
9
10
Verify whether uploading ImageData via texImage2D/texSubImage2D is supported
11
PASS getError was expected value: NO_ERROR : texture parameter setup should succeed
12
PASS getError was expected value: INVALID_OPERATION : Uploading to half float texture is not yet supported
13
PASS getError was expected value: NO_ERROR : Uploading null ArrayBufferView to half float texture should succeed
14
PASS getError was expected value: INVALID_OPERATION : Uploading to half float texture using texSubImage2D is not supported yet
15
16
Verify whether uploading HTMLImageElement via texImage2D/texSubImage2D is supported
17
18
Verify whether uploading HTMLCanvasElement via texImage2D/texSubImage2D is supported
19
PASS getError was expected value: NO_ERROR : texture parameter setup should succeed
20
PASS getError was expected value: INVALID_OPERATION : Uploading to half float texture is not yet supported
21
PASS getError was expected value: NO_ERROR : Uploading null ArrayBufferView to half float texture should succeed
22
PASS getError was expected value: INVALID_OPERATION : Uploading to half float texture using texSubImage2D is not supported yet
23
24
Verify whether uploading HTMLVideoElement via texImage2D/texSubImage2D is supported
25
26
PASS successfullyParsed is true
27
28
TEST COMPLETE
29
PASS getError was expected value: NO_ERROR : texture parameter setup should succeed
30
PASS getError was expected value: INVALID_OPERATION : Uploading to half float texture is not yet supported
31
PASS getError was expected value: NO_ERROR : Uploading null ArrayBufferView to half float texture should succeed
32
PASS getError was expected value: INVALID_OPERATION : Uploading to half float texture using texSubImage2D is not supported yet
33
PASS getError was expected value: NO_ERROR : texture parameter setup should succeed
34
PASS getError was expected value: INVALID_OPERATION : Uploading to half float texture is not yet supported
35
PASS getError was expected value: NO_ERROR : Uploading null ArrayBufferView to half float texture should succeed
36
PASS getError was expected value: INVALID_OPERATION : Uploading to half float texture using texSubImage2D is not supported yet
37
PASS successfullyParsed is true
38
39
TEST COMPLETE
40
 
- a/LayoutTests/fast/canvas/webgl/oes-texture-half-float-not-supported.html +170 lines
Line 0 a/LayoutTests/fast/canvas/webgl/oes-texture-half-float-not-supported.html_sec1
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<meta charset="utf-8">
5
<title>WebGL OES_texture_half_float not yet implemented Conformance Tests</title>
6
<link rel="stylesheet" href="../../js/resources/js-test-style.css"/>
7
<script src="resources/desktop-gl-constants.js" type="text/javascript"></script>
8
<script src="../../js/resources/js-test-pre.js"></script>
9
<script src="resources/webgl-test.js"></script>
10
<script src="resources/webgl-test-utils.js"></script>
11
</head>
12
<body>
13
<canvas id="texcanvas" width="1" height="2"></canvas>
14
<script>
15
description("Testing not yet supported texture uploads");
16
debug("");
17
18
if (window.initNonKhronosFramework) {
19
    window.initNonKhronosFramework(true);
20
}
21
22
if (window.internals)
23
    window.internals.settings.setWebGLErrorsToConsoleEnabled(false);
24
25
var wtu = WebGLTestUtils;
26
var canvas = document.getElementById("canvas");
27
var gl = wtu.create3DContext(canvas);
28
var successfullyParsed = false;
29
30
if (!gl) {
31
    testFailed("WebGL context does not exists");
32
} else {
33
    testPassed("WebGL context exists");
34
35
    if(!gl.getExtension("OES_texture_half_float")) {
36
        testPassed("No OES_texture_half_float support. This is legal");
37
    } else {
38
        testPassed("Successfully enabled OES_texture_half_float extension");
39
        
40
        var canvas2d = document.getElementById("texcanvas");
41
        var context2d = canvas2d.getContext("2d");
42
43
        runImageDataUnsupportedTest(canvas2d, context2d);
44
        runHTMLImageElementUnsupportedTest(canvas2d, context2d);
45
        runHTMLCanvasElementUnsupportedTest(canvas2d, context2d);
46
        runHTMLVideoElementUnsupportedTest(canvas2d, context2d);
47
    }
48
}
49
50
function allocateTexture()
51
{
52
    var texture = gl.createTexture();
53
    gl.bindTexture(gl.TEXTURE_2D, texture);
54
    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
55
    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
56
    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
57
    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
58
    glErrorShouldBe(gl, gl.NO_ERROR, "texture parameter setup should succeed");
59
    return texture;
60
}
61
62
function runTextureUploadTest(image)
63
{
64
    var texture = allocateTexture();
65
    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.HALF_FLOAT_OES, image);
66
    glErrorShouldBe(gl, gl.INVALID_OPERATION, "Uploading to half float texture is not yet supported");
67
68
    // Check if uploading ImageData via texSubImage2D is supported
69
    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 1, 2, 0, gl.RGBA, gl.HALF_FLOAT_OES, null);
70
    glErrorShouldBe(gl, gl.NO_ERROR, "Uploading null ArrayBufferView to half float texture should succeed");
71
    gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.HALF_FLOAT_OES, image);
72
    glErrorShouldBe(gl, gl.INVALID_OPERATION, "Uploading to half float texture using texSubImage2D is not supported yet");
73
}
74
75
function runImageDataUnsupportedTest(canvas2d, context2d)
76
{
77
    debug("");
78
    debug("Verify whether uploading ImageData via texImage2D/texSubImage2D is supported");
79
    
80
    // Check if uploading ImageData via texImage2D is supported
81
    var imageData = context2d.createImageData(1, 2);
82
    var data = imageData.data;
83
    data[0] = 255;
84
    data[1] = 0;
85
    data[2] = 0;
86
    data[3] = 255;
87
    data[4] = 0;
88
    data[5] = 255;
89
    data[6] = 0;
90
    data[7] = 0;
91
92
    runTextureUploadTest(imageData);    
93
}
94
95
function runHTMLImageElementUnsupportedTest(canvas2d, context2d)
96
{
97
    debug("");
98
    debug("Verify whether uploading HTMLImageElement via texImage2D/texSubImage2D is supported");
99
100
    var imageData = context2d.createImageData(1, 2);
101
    var data = imageData.data;
102
    data[0] = 255;
103
    data[1] = 0;
104
    data[2] = 0;
105
    data[3] = 255;
106
    data[4] = 0;
107
    data[5] = 255;
108
    data[6] = 0;
109
    data[7] = 0;
110
    context2d.putImageData(imageData, 0, 0);
111
112
    var newImage = document.createElement("img");
113
    newImage.onload = function() {
114
        runTextureUploadTest(newImage);
115
    }
116
    newImage.src = canvas2d.toDataURL();
117
}
118
119
function setCanvasToRedGreen(ctx) {
120
    var width = ctx.canvas.width;
121
    var height = ctx.canvas.height;
122
    var halfHeight = Math.floor(height / 2);
123
    ctx.fillStyle = "#ff0000";
124
    ctx.fillRect(0, 0, width, halfHeight);
125
    ctx.fillStyle = "#00ff00";
126
    ctx.fillRect(0, halfHeight, width, height - halfHeight);
127
}
128
129
function runHTMLCanvasElementUnsupportedTest(canvas2d, context2d)
130
{
131
    debug("");
132
    debug("Verify whether uploading HTMLCanvasElement via texImage2D/texSubImage2D is supported");
133
    
134
    context2d.width = 1;
135
    context2d.height = 2;
136
    setCanvasToRedGreen(context2d);
137
138
    runTextureUploadTest(canvas2d);
139
}
140
141
function runHTMLVideoElementUnsupportedTest(canvas2d, context2d)
142
{
143
    debug("");
144
    debug("Verify whether uploading HTMLVideoElement via texImage2D/texSubImage2D is supported");
145
146
    var info = { src: "resources/red-green.mp4", type: 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"'};
147
    var video = document.createElement("video");
148
    if (!video.canPlayType) {
149
        testFailed("video.canPlayType required method is missing");
150
        return;
151
    }
152
    document.body.appendChild(video);
153
    video.addEventListener(
154
        "playing", function() { runTextureUploadTest(video); finishTest(); }, true);
155
    video.type = info.type;
156
    video.src = info.src;
157
    video.loop = true;
158
    video.width = 1;
159
    video.height = 2;
160
    video.play();
161
162
}
163
164
debug("");
165
166
</script>
167
<script src="../../js/resources/js-test-post.js"></script>
168
</body>
169
</html>
170
- a/LayoutTests/fast/canvas/webgl/oes-texture-half-float.html +249 lines
Line 0 a/LayoutTests/fast/canvas/webgl/oes-texture-half-float.html_sec1
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<meta charset="utf-8">
5
<title>WebGL OES_texture_half_float Conformance Tests</title>
6
<link rel="stylesheet" href="../../js/resources/js-test-style.css"/>
7
<script src="resources/desktop-gl-constants.js" type="text/javascript"></script>
8
<script src="../../js/resources/js-test-pre.js"></script>
9
<script src="resources/webgl-test.js"></script>
10
<script src="resources/webgl-test-utils.js"></script>
11
</head>
12
<body>
13
<div id="description"></div>
14
<canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>
15
<div id="console"></div>
16
<script id="testFragmentShader" type="x-shader/x-fragment">
17
precision mediump float;
18
uniform sampler2D tex;
19
uniform vec4 subtractor;
20
varying vec2 texCoord;
21
void main()
22
{
23
    vec4 color = texture2D(tex, texCoord);
24
    if (abs(color.r - subtractor.r) +
25
        abs(color.g - subtractor.g) +
26
        abs(color.b - subtractor.b) +
27
        abs(color.a - subtractor.a) < 8.0) {
28
        gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
29
    } else {
30
        gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
31
    }
32
}
33
</script>
34
<!-- Shaders for testing half floating-point render targets -->
35
<script id="positionVertexShader" type="x-shader/x-vertex">
36
attribute vec4 vPosition;
37
void main()
38
{
39
    gl_Position = vPosition;
40
}
41
</script>
42
<script id="floatingPointFragmentShader" type="x-shader/x-fragment">
43
void main()
44
{
45
    gl_FragColor = vec4(10000.0, 10000.0, 10000.0, 10000.0);
46
}
47
</script>
48
<script>
49
description("This test verifies the functionality of OES_texture_half_float with null/non-null ArrayBufferView");
50
debug("");
51
52
if (window.internals)
53
    window.internals.settings.setWebGLErrorsToConsoleEnabled(false);
54
55
var wtu = WebGLTestUtils;
56
var canvas = document.getElementById("canvas");
57
var gl = wtu.create3DContext(canvas);
58
59
if (!gl) {
60
    testFailed("WebGL context does not exists");
61
} else {
62
    testPassed("WebGL context exists");
63
64
    // Verify that allocation of texture fails if extension is not enabled
65
    runTextureCreationTest(false);
66
67
    if(!gl.getExtension("OES_texture_half_float")) {
68
        testPassed("No OES_texture_half_float support. This is legal");
69
    } else {
70
        testPassed("Successfully enabled OES_texture_half_float extension");
71
72
        // Check if creation of texture succeed's with various formats and null ArrayBufferView
73
        var formats = [gl.RGBA, gl.RGB, gl.LUMINANCE, gl.ALPHA, gl.LUMINANCE_ALPHA];
74
        for (var i = 0; i < formats.length; i++) {
75
            runTextureCreationTest(true, formats[i], null);
76
        }
77
        
78
        // Texture creation should fail when passed with non-null ArrayBufferView
79
        for (var i = 0; i < formats.length; i++) {
80
            var width = 2;
81
            var height = 2;
82
            
83
            // Float32Array
84
            var float32Data = new Float32Array(width * height * getNumberOfChannels(formats[i]));
85
            for (var ii = 0; ii < float32Data.length; ii++) {
86
                float32Data[ii] = 1000;
87
            }
88
            runTextureCreationTest(true, formats[i], float32Data);
89
90
            // Int16Array
91
            var int16Data = new Int16Array(width * height * getNumberOfChannels(formats[i]));
92
            for (var ii = 0; ii <  int16Data.length; ii++) {
93
                int16Data[ii] = 1000;
94
            }
95
            runTextureCreationTest(true, formats[i], int16Data);
96
97
            // Uint16Array
98
            var uint16Data = new Uint16Array(width * height * getNumberOfChannels(formats[i]));
99
            for (var ii = 0; ii <  uint16Data.length; ii++) {
100
                uint16Data[ii] = 1000;
101
            }
102
            runTextureCreationTest(true, formats[i], uint16Data);            
103
        }
104
105
        // Check if attaching texture as FBO target succeeds (Not mandatory)
106
        runRenderTargetTest();
107
        // Check of getExtension() returns same object
108
        runUniqueObjectTest();
109
    }
110
}
111
112
function getNumberOfChannels(format)
113
{
114
    if (format == gl.RGBA)
115
        return 4;
116
    else if (format == gl.RGB)
117
        return 3;
118
    else if (format == gl.LUMINANCE || format == gl.ALPHA)
119
        return 1;
120
    else if (format == gl.LUMINANCE_ALPHA)
121
        return 2;
122
}
123
124
function getFormatName(format)
125
{
126
    if (format == gl.RGBA)
127
        return "RGBA";
128
    else if (format == gl.RGB)
129
        return "RGB";
130
    else if (format == gl.LUMINANCE)
131
        return "LUMINANCE";
132
    else if (format == gl.ALPHA)
133
        return "ALPHA";
134
    else if (format == gl.LUMINANCE_ALPHA)
135
        return "LUMINANCE_ALPHA";
136
}
137
138
function allocateTexture()
139
{
140
    var texture = gl.createTexture();
141
    gl.bindTexture(gl.TEXTURE_2D, texture);
142
    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
143
    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
144
    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
145
    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
146
    glErrorShouldBe(gl, gl.NO_ERROR, "texture parameter setup should succeed");
147
    return texture;
148
}
149
150
function runTextureCreationTest(extensionEnabled, opt_format, opt_data)
151
{
152
    var format = opt_format || gl.RGBA;
153
    var data = opt_data || null;
154
    var expectSuccess = true;
155
    
156
    if (!extensionEnabled || data)
157
        expectSuccess = false;
158
    debug("Testing texture creation with extension " + (extensionEnabled ? "enabled" : "disabled") +
159
          ", format " + getFormatName(format) + ", and data " + (data ? "non-null" : "null") +
160
          ". Expect " + (expectSuccess ? "Success" : "Failure"));   
161
162
    var texture = allocateTexture();
163
    var width = 2;
164
    var height = 2;
165
    gl.texImage2D(gl.TEXTURE_2D, 0, format, width, height, 0, format, gl.HALF_FLOAT_OES, data);
166
    if(!extensionEnabled) {
167
        glErrorShouldBe(gl, gl.INVALID_ENUM, "Half floating point texture must be diallowed if OES_texture_half_float isn't enabled");
168
        return;
169
    } else if (data) {
170
        glErrorShouldBe(gl, gl.INVALID_OPERATION, "Half floating point texture allocation must be diallowed when ArrayBufferView is not-null");
171
        return;
172
    } else {
173
        glErrorShouldBe(gl, gl.NO_ERROR, "Half floating point texture allocation should succeed if OES_texture_half_float is enabled");
174
    }
175
}
176
177
function checkRenderingResults()
178
{
179
    wtu.checkCanvas(gl, [0, 255, 0, 255], "should be green");
180
}
181
182
function runRenderTargetTest(testProgram)
183
{
184
    debug("");
185
    debug("Testing half floating point render target");
186
187
    var texture = allocateTexture();
188
    var width = 2;
189
    var height = 2;
190
    
191
    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.HALF_FLOAT_OES, null);
192
    glErrorShouldBe(gl, gl.NO_ERROR, "Half floating point texture allocation should succeed if OES_texture_half_float is enabled");
193
194
    // Try to use this texture as render target
195
    var fbo = gl.createFramebuffer();
196
    gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
197
    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);
198
    gl.bindTexture(gl.TEXTURE_2D, null);
199
200
    // It is legal for a WebGL implementation exposing the OES_texture_half_float extension to
201
    // support half floating point textures but not as attachments to framebuffer objects.
202
    if (gl.checkFramebufferStatus(gl.FRAMEBUFFER) != gl.FRAMEBUFFER_COMPLETE) {
203
        debug("Half floating point render targets not supported -- this is legal");
204
        return;
205
    }
206
207
    var renderProgram =
208
        wtu.setupProgram(gl,
209
                         ["positionVertexShader", "floatingPointFragmentShader"],
210
                         ['vPosition'],
211
                         [0]);
212
    wtu.drawQuad(gl);
213
    glErrorShouldBe(gl, gl.NO_ERROR, "Rendering to half floating point texture should succeed");
214
215
    // Now sample from the half floating-point texture and verify we got the correct values.
216
    var texturedShaders = [
217
      wtu.setupSimpleTextureVertexShader(gl),
218
          "testFragmentShader"
219
      ];
220
    var testProgram =
221
        wtu.setupProgram(gl,
222
                        [wtu.setupSimpleTextureVertexShader(gl), "testFragmentShader"],
223
                        ['vPosition', 'texCoord0'],
224
                        [0, 1]);
225
    var quadParameters = wtu.setupUnitQuad(gl, 0, 1);
226
    gl.bindFramebuffer(gl.FRAMEBUFFER, null);
227
    gl.bindTexture(gl.TEXTURE_2D, texture);
228
    gl.useProgram(testProgram);
229
    gl.uniform1i(gl.getUniformLocation(testProgram, "tex"), 0);
230
    wtu.drawQuad(gl);
231
    glErrorShouldBe(gl, gl.NO_ERROR, "rendering from half floating point texture should succeed");
232
    checkRenderingResults();
233
}
234
235
function runUniqueObjectTest()
236
{
237
    debug("Testing that getExtension() returns the same object each time");
238
    gl.getExtension("OES_texture_half_float").myProperty = 2;
239
    gc();
240
    shouldBe('gl.getExtension("OES_texture_half_float").myProperty', '2');
241
}
242
243
debug("");
244
var successfullyParsed = true;
245
</script>
246
<script src="../../js/resources/js-test-post.js"></script>
247
248
</body>
249
</html>
- a/LayoutTests/platform/chromium/TestExpectations +4 lines
Lines 4433-4435 webkit.org/b/110876 html5lib/generated/run-tests19-data.html [ Slow ] a/LayoutTests/platform/chromium/TestExpectations_sec1
4433
webkit.org/b/110876 [ Debug Win ] html5lib/generated/run-tests10-write.html [ Pass Crash ]
4433
webkit.org/b/110876 [ Debug Win ] html5lib/generated/run-tests10-write.html [ Pass Crash ]
4434
webkit.org/b/110876 [ Debug Win Mac ] html5lib/generated/run-tests16-write.html [ Pass Crash ]
4434
webkit.org/b/110876 [ Debug Win Mac ] html5lib/generated/run-tests16-write.html [ Pass Crash ]
4435
webkit.org/b/110876 [ Debug Win ] html5lib/generated/run-tests19-write.html [ Pass Crash ]
4435
webkit.org/b/110876 [ Debug Win ] html5lib/generated/run-tests19-write.html [ Pass Crash ]
4436
4437
# HALF_FLOAT_OES is not yet working in chromium.
4438
crbug.com/179503 fast/canvas/webgl/oes-texture-half-float.html [ Failure ]
4439
crbug.com/179503 fast/canvas/webgl/oes-texture-half-float-not-supported.html [ Timeout ]

Return to Bug 110818