Diff
Modified: trunk/LayoutTests/ChangeLog (177193 => 177194)
--- trunk/LayoutTests/ChangeLog 2014-12-12 00:46:19 UTC (rev 177193)
+++ trunk/LayoutTests/ChangeLog 2014-12-12 00:56:33 UTC (rev 177194)
@@ -1,3 +1,13 @@
+2014-12-11 Roger Fong <[email protected]>
+
+ Implement frag depth as a WebGL 1 extension.
+ https://bugs.webkit.org/show_bug.cgi?id=133635.
+ <rdar://problem/19195381>
+
+ Reviewed by Dean Jackson.
+
+ * platform/mac/TestExpectations: Unskip passing WebGL1 extension tests.
+
2014-12-11 Brendan Long <[email protected]>
Remove DataCue "text" attribute
Modified: trunk/LayoutTests/platform/mac/TestExpectations (177193 => 177194)
--- trunk/LayoutTests/platform/mac/TestExpectations 2014-12-12 00:46:19 UTC (rev 177193)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2014-12-12 00:56:33 UTC (rev 177194)
@@ -491,7 +491,21 @@
[ MountainLion ] webgl/1.0.2/conformance/textures/texture-size.html [ Failure ]
# Skip 1.0.3 tests for now, to be unskipped when we get closer to conformance
-webgl/1.0.3
+webgl/1.0.3/conformance/attribs [ Skip ]
+webgl/1.0.3/conformance/buffers [ Skip ]
+webgl/1.0.3/conformance/canvas [ Skip ]
+webgl/1.0.3/conformance/context [ Skip ]
+webgl/1.0.3/conformance/glsl [ Skip ]
+webgl/1.0.3/conformance/renderbuffers [ Skip ]
+webgl/1.0.3/conformance/rendering [ Skip ]
+webgl/1.0.3/conformance/state [ Skip ]
+webgl/1.0.3/conformance/textures [ Skip ]
+webgl/1.0.3/conformance/typedarrays [ Skip ]
+webgl/1.0.3/conformance/uniforms [ Skip ]
+webgl/1.0.3/conformance/extensions/angle-instanced-arrays.html [ Skip ]
+webgl/1.0.3/conformance/extensions/oes-texture-half-float.html [ Skip ]
+webgl/1.0.3/conformance/extensions/webgl-compressed-texture-size-limit.html [ Skip ]
+webgl/1.0.3/conformance/extensions/webgl-draw-buffers.html [ Skip ]
# Sending the mouse down event to the scrollbar starts a nested run loop which causes a hang.
fast/events/mousedown-in-subframe-scrollbar.html [ Skip ]
Modified: trunk/Source/WebCore/CMakeLists.txt (177193 => 177194)
--- trunk/Source/WebCore/CMakeLists.txt 2014-12-12 00:46:19 UTC (rev 177193)
+++ trunk/Source/WebCore/CMakeLists.txt 2014-12-12 00:56:33 UTC (rev 177194)
@@ -532,6 +532,7 @@
html/canvas/CanvasRenderingContext.idl
html/canvas/CanvasRenderingContext2D.idl
html/canvas/DOMPath.idl
+ html/canvas/EXTFragDepth.idl
html/canvas/EXTShaderTextureLOD.idl
html/canvas/EXTTextureFilterAnisotropic.idl
html/canvas/EXTsRGB.idl
@@ -1674,6 +1675,7 @@
html/canvas/CanvasRenderingContext.cpp
html/canvas/CanvasRenderingContext2D.cpp
html/canvas/CanvasStyle.cpp
+ html/canvas/EXTFragDepth.cpp
html/canvas/EXTShaderTextureLOD.cpp
html/canvas/EXTTextureFilterAnisotropic.cpp
html/canvas/EXTsRGB.cpp
@@ -2805,6 +2807,7 @@
list(APPEND WebCore_SOURCES
html/canvas/ANGLEInstancedArrays.cpp
+ html/canvas/EXTFragDepth.cpp
html/canvas/EXTShaderTextureLOD.cpp
html/canvas/EXTTextureFilterAnisotropic.cpp
html/canvas/EXTsRGB.cpp
@@ -2844,6 +2847,7 @@
)
list(APPEND WebCore_IDL_FILES
html/canvas/ANGLEInstancedArrays.idl
+ html/canvas/EXTFragDepth.idl
html/canvas/EXTShaderTextureLOD.idl
html/canvas/EXTTextureFilterAnisotropic.idl
html/canvas/EXTsRGB.idl
Modified: trunk/Source/WebCore/ChangeLog (177193 => 177194)
--- trunk/Source/WebCore/ChangeLog 2014-12-12 00:46:19 UTC (rev 177193)
+++ trunk/Source/WebCore/ChangeLog 2014-12-12 00:56:33 UTC (rev 177194)
@@ -1,3 +1,41 @@
+2014-12-10 Roger Fong <[email protected]>
+
+ Implement frag depth as a WebGL 1 extension.
+ https://bugs.webkit.org/show_bug.cgi?id=133635.
+ <rdar://problem/19195381>
+
+ Reviewed by Dean Jackson.
+
+ Test:
+ webgl/1.0.3/conformance/extensions/ext-frag-depth.html
+
+ Spec for this extension outlined here:
+ http://www.khronos.org/registry/webgl/extensions/EXT_frag_depth/
+
+ * CMakeLists.txt:
+ * DerivedSources.cpp:
+ * DerivedSources.make:
+ * WebCore.vcxproj/WebCore.vcxproj:
+ * WebCore.vcxproj/WebCore.vcxproj.filters:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSWebGLRenderingContextCustom.cpp:
+ (WebCore::toJS):
+ * html/canvas/EXTFragDepth.cpp: Added.
+ (WebCore::EXTFragDepth::EXTFragDepth):
+ (WebCore::EXTFragDepth::~EXTFragDepth):
+ (WebCore::EXTFragDepth::getName):
+ * html/canvas/EXTFragDepth.h: Added.
+ * html/canvas/EXTFragDepth.idl: Added.
+ * html/canvas/WebGLExtension.h:
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::getExtension):
+ (WebCore::WebGLRenderingContext::getSupportedExtensions):
+ * html/canvas/WebGLRenderingContext.h:
+ * platform/graphics/opengl/Extensions3DOpenGL.cpp:
+ (WebCore::Extensions3DOpenGL::supportsExtension):
+ * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
+ (WebCore::Extensions3DOpenGLCommon::ensureEnabled):
+
2014-12-11 Chris Dumez <[email protected]>
Optimize RenderElement::rendererForRootBackground() a bit
Modified: trunk/Source/WebCore/DerivedSources.cpp (177193 => 177194)
--- trunk/Source/WebCore/DerivedSources.cpp 2014-12-12 00:46:19 UTC (rev 177193)
+++ trunk/Source/WebCore/DerivedSources.cpp 2014-12-12 00:56:33 UTC (rev 177194)
@@ -42,6 +42,7 @@
#include "JSCanvasRenderingContext.cpp"
#include "JSCanvasRenderingContext2D.cpp"
#if ENABLE(WEBGL)
+#include "JSEXTFragDepth.cpp"
#include "JSEXTShaderTextureLOD.cpp"
#include "JSEXTTextureFilterAnisotropic.cpp"
#include "JSEXTsRGB.cpp"
Modified: trunk/Source/WebCore/DerivedSources.make (177193 => 177194)
--- trunk/Source/WebCore/DerivedSources.make 2014-12-12 00:46:19 UTC (rev 177193)
+++ trunk/Source/WebCore/DerivedSources.make 2014-12-12 00:56:33 UTC (rev 177194)
@@ -425,6 +425,7 @@
$(WebCore)/html/canvas/EXTShaderTextureLOD.idl \
$(WebCore)/html/canvas/EXTTextureFilterAnisotropic.idl \
$(WebCore)/html/canvas/EXTsRGB.idl \
+ $(WebCore)/html/canvas/EXTFragDepth.idl \
$(WebCore)/html/canvas/OESElementIndexUint.idl \
$(WebCore)/html/canvas/OESStandardDerivatives.idl \
$(WebCore)/html/canvas/OESTextureFloat.idl \
Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (177193 => 177194)
--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj 2014-12-12 00:46:19 UTC (rev 177193)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj 2014-12-12 00:56:33 UTC (rev 177194)
@@ -734,6 +734,20 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
</ClCompile>
+ <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSEXTFragDepth.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="..\accessibility\AccessibilityNodeObject.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
@@ -6670,6 +6684,7 @@
<ClCompile Include="..\html\canvas\CanvasPathMethods.cpp" />
<ClCompile Include="..\html\canvas\EXTShaderTextureLOD.cpp" />
<ClCompile Include="..\html\canvas\EXTsRGB.cpp" />
+ <ClCompile Include="..\html\canvas\EXTFragDepth.cpp" />
<ClCompile Include="..\html\canvas\EXTTextureFilterAnisotropic.cpp" />
<ClCompile Include="..\html\canvas\OESElementIndexUint.cpp" />
<ClCompile Include="..\html\canvas\OESStandardDerivatives.cpp" />
@@ -18866,6 +18881,7 @@
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSVTTRegionList.cpp" />
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSVTTRegionList.h" />
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSEXTsRGB.h" />
+ <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSEXTFragDepth.h” />
<ClInclude Include="..\accessibility\AccessibilityNodeObject.h" />
<ClInclude Include="..\css\CSSImageSetValue.h" />
<ClInclude Include="..\css\WebKitCSSResourceValue.h" />
@@ -18955,6 +18971,7 @@
<ClInclude Include="..\html\canvas\CanvasPathMethods.h" />
<ClInclude Include="..\html\canvas\EXTShaderTextureLOD.h" />
<ClInclude Include="..\html\canvas\EXTsRGB.h" />
+ <ClInclude Include="..\html\canvas\EXTFragDepth.h” />
<ClInclude Include="..\html\canvas\EXTTextureFilterAnisotropic.h" />
<ClInclude Include="..\html\canvas\OESElementIndexUint.h" />
<ClInclude Include="..\html\canvas\OESStandardDerivatives.h" />
Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (177193 => 177194)
--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters 2014-12-12 00:46:19 UTC (rev 177193)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters 2014-12-12 00:56:33 UTC (rev 177194)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="DerivedSources">
@@ -7261,6 +7261,12 @@
<ClCompile Include="..\html\canvas\EXTsRGB.cpp">
<Filter>html\canvas</Filter>
</ClCompile>
+ <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSEXTFragDepth.cpp">
+ <Filter>DerivedSources</Filter>
+ </ClCompile>
+ <ClCompile Include="..\html\canvas\EXTFragDepth.cpp">
+ <Filter>html\canvas</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\Modules\geolocation\Coordinates.h">
@@ -15266,6 +15272,12 @@
<ClInclude Include="..\html\canvas\EXTsRGB.h">
<Filter>html\canvas</Filter>
</ClInclude>
+ <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSEXTFragDepth.h”>
+ <Filter>DerivedSources</Filter>
+ </ClInclude>
+ <ClInclude Include="..\html\canvas\EXTFragDepth.h”>
+ <Filter>html\canvas</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\css\CSSGrammar.y.in">
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (177193 => 177194)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2014-12-12 00:46:19 UTC (rev 177193)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2014-12-12 00:56:33 UTC (rev 177194)
@@ -2312,7 +2312,8 @@
72626E020EF022FE00A07E20 /* FontFastPath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 72626E010EF022FE00A07E20 /* FontFastPath.cpp */; };
727AFED41A2EA6AE000442E8 /* EXTsRGB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 727AFED11A2EA6A0000442E8 /* EXTsRGB.cpp */; };
72E417631A2E8D2F004C562A /* JSEXTsRGB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 72E417611A2E8D2F004C562A /* JSEXTsRGB.cpp */; };
- 72E417651A2E8D50004C562A /* JSEXTsRGB.h in Headers */ = {isa = PBXBuildFile; fileRef = 72E417621A2E8D2F004C562A /* JSEXTsRGB.h */; };
+ 72F1ADA21A3904DC00014E18 /* EXTFragDepth.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 72F1AD9F1A3904C300014E18 /* EXTFragDepth.cpp */; };
+ 72F1ADA51A390B9F00014E18 /* JSEXTFragDepth.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 72F1ADA31A390B9F00014E18 /* JSEXTFragDepth.cpp */; };
754133A8102E00E800075D00 /* InspectorTimelineAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 754133A7102E00E800075D00 /* InspectorTimelineAgent.h */; };
754133AA102E00F400075D00 /* InspectorTimelineAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 754133A9102E00F400075D00 /* InspectorTimelineAgent.cpp */; };
7553CFE8108F473F00EA281E /* TimelineRecordFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7553CFE6108F473F00EA281E /* TimelineRecordFactory.h */; };
@@ -9494,6 +9495,11 @@
727AFED31A2EA6A0000442E8 /* EXTsRGB.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = EXTsRGB.idl; path = canvas/EXTsRGB.idl; sourceTree = "<group>"; };
72E417611A2E8D2F004C562A /* JSEXTsRGB.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSEXTsRGB.cpp; sourceTree = "<group>"; };
72E417621A2E8D2F004C562A /* JSEXTsRGB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEXTsRGB.h; sourceTree = "<group>"; };
+ 72F1AD9F1A3904C300014E18 /* EXTFragDepth.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EXTFragDepth.cpp; path = canvas/EXTFragDepth.cpp; sourceTree = "<group>"; };
+ 72F1ADA01A3904C300014E18 /* EXTFragDepth.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EXTFragDepth.h; path = canvas/EXTFragDepth.h; sourceTree = "<group>"; };
+ 72F1ADA11A3904C300014E18 /* EXTFragDepth.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = EXTFragDepth.idl; path = canvas/EXTFragDepth.idl; sourceTree = "<group>"; };
+ 72F1ADA31A390B9F00014E18 /* JSEXTFragDepth.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSEXTFragDepth.cpp; path = "JSEXTFragDepth.cpp"; sourceTree = "<group>"; };
+ 72F1ADA41A390B9F00014E18 /* JSEXTFragDepth.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSEXTFragDepth.h; path = "JSEXTFragDepth.h"; sourceTree = "<group>"; };
754133A7102E00E800075D00 /* InspectorTimelineAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorTimelineAgent.h; sourceTree = "<group>"; };
754133A9102E00F400075D00 /* InspectorTimelineAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorTimelineAgent.cpp; sourceTree = "<group>"; };
7553CFE6108F473F00EA281E /* TimelineRecordFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TimelineRecordFactory.h; sourceTree = "<group>"; };
@@ -15820,6 +15826,9 @@
727AFED11A2EA6A0000442E8 /* EXTsRGB.cpp */,
727AFED21A2EA6A0000442E8 /* EXTsRGB.h */,
727AFED31A2EA6A0000442E8 /* EXTsRGB.idl */,
+ 72F1AD9F1A3904C300014E18 /* EXTFragDepth.cpp */,
+ 72F1ADA01A3904C300014E18 /* EXTFragDepth.h */,
+ 72F1ADA11A3904C300014E18 /* EXTFragDepth.idl */,
7E5D7A73161D3F8F00896C34 /* OESElementIndexUint.cpp */,
7E5D7A74161D3F8F00896C34 /* OESElementIndexUint.h */,
E176580C180DF3A0005A96D1 /* OESElementIndexUint.idl */,
@@ -18722,6 +18731,8 @@
A83B79080CCAFF2B000B0825 /* HTML */ = {
isa = PBXGroup;
children = (
+ 72F1ADA31A390B9F00014E18 /* JSEXTFragDepth.cpp */,
+ 72F1ADA41A390B9F00014E18 /* JSEXTFragDepth.h */,
72E417611A2E8D2F004C562A /* JSEXTsRGB.cpp */,
72E417621A2E8D2F004C562A /* JSEXTsRGB.h */,
31A795C41888BAD100382F90 /* JSANGLEInstancedArrays.cpp */,
@@ -23488,7 +23499,6 @@
FD315FFC12B0267600C1A359 /* AudioBufferSourceNode.h in Headers */,
FD31607C12B026F700C1A359 /* AudioBus.h in Headers */,
FD31607E12B026F700C1A359 /* AudioChannel.h in Headers */,
- 72E417651A2E8D50004C562A /* JSEXTsRGB.h in Headers */,
FD31600512B0267600C1A359 /* AudioContext.h in Headers */,
FD31607F12B026F700C1A359 /* AudioDestination.h in Headers */,
070F549E17F2402700169E04 /* AudioDestinationConsumer.h in Headers */,
@@ -27364,6 +27374,7 @@
5F2DBBE9178E3C8100141486 /* CertificateInfoMac.mm in Sources */,
E1A8E56617552B2A007488E7 /* CFURLExtras.cpp in Sources */,
97BC69DC1505F076001B74AC /* ChangeVersionWrapper.cpp in Sources */,
+ 72F1ADA21A3904DC00014E18 /* EXTFragDepth.cpp in Sources */,
FD315FFE12B0267600C1A359 /* ChannelMergerNode.cpp in Sources */,
FD31600112B0267600C1A359 /* ChannelSplitterNode.cpp in Sources */,
6550B69F099DF0270090D781 /* CharacterData.cpp in Sources */,
@@ -29994,6 +30005,7 @@
29A8124A0FBB9CA900510293 /* WebAccessibilityObjectWrapperBase.mm in Sources */,
AAA728F816D1D8BC00D3BBC6 /* WebAccessibilityObjectWrapperIOS.mm in Sources */,
AA478A8016CD70C3007D1BB4 /* WebAccessibilityObjectWrapperMac.mm in Sources */,
+ 72F1ADA51A390B9F00014E18 /* JSEXTFragDepth.cpp in Sources */,
2D3EF4491917915C00034184 /* WebActionDisablingCALayerDelegate.mm in Sources */,
A56C5B9A189F34570082D13C /* WebConsoleAgent.cpp in Sources */,
CD7E05221651C28200C1201F /* WebCoreAVFResourceLoader.mm in Sources */,
Modified: trunk/Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp (177193 => 177194)
--- trunk/Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp 2014-12-12 00:46:19 UTC (rev 177193)
+++ trunk/Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp 2014-12-12 00:56:33 UTC (rev 177194)
@@ -30,6 +30,7 @@
#include "JSWebGLRenderingContext.h"
#include "ANGLEInstancedArrays.h"
+#include "EXTFragDepth.h"
#include "EXTShaderTextureLOD.h"
#include "EXTTextureFilterAnisotropic.h"
#include "EXTsRGB.h"
@@ -37,6 +38,7 @@
#include "HTMLCanvasElement.h"
#include "HTMLImageElement.h"
#include "JSANGLEInstancedArrays.h"
+#include "JSEXTFragDepth.h"
#include "JSEXTShaderTextureLOD.h"
#include "JSEXTTextureFilterAnisotropic.h"
#include "JSEXTsRGB.h"
@@ -215,6 +217,8 @@
return toJS(exec, globalObject, static_cast<EXTTextureFilterAnisotropic*>(extension));
case WebGLExtension::EXTsRGBName:
return toJS(exec, globalObject, static_cast<EXTsRGB*>(extension));
+ case WebGLExtension::EXTFragDepthName:
+ return toJS(exec, globalObject, static_cast<EXTFragDepth*>(extension));
case WebGLExtension::OESStandardDerivativesName:
return toJS(exec, globalObject, static_cast<OESStandardDerivatives*>(extension));
case WebGLExtension::OESTextureFloatName:
Added: trunk/Source/WebCore/html/canvas/EXTFragDepth.cpp (0 => 177194)
--- trunk/Source/WebCore/html/canvas/EXTFragDepth.cpp (rev 0)
+++ trunk/Source/WebCore/html/canvas/EXTFragDepth.cpp 2014-12-12 00:56:33 UTC (rev 177194)
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if ENABLE(WEBGL)
+#include "EXTFragDepth.h"
+
+namespace WebCore {
+
+EXTFragDepth::EXTFragDepth(WebGLRenderingContext* context)
+ : WebGLExtension(context)
+{
+}
+
+EXTFragDepth::~EXTFragDepth()
+{
+}
+
+WebGLExtension::ExtensionName EXTFragDepth::getName() const
+{
+ return EXTFragDepthName;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(WEBGL)
Added: trunk/Source/WebCore/html/canvas/EXTFragDepth.h (0 => 177194)
--- trunk/Source/WebCore/html/canvas/EXTFragDepth.h (rev 0)
+++ trunk/Source/WebCore/html/canvas/EXTFragDepth.h 2014-12-12 00:56:33 UTC (rev 177194)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef EXTFragDepth_h
+#define EXTFragDepth_h
+
+#include "WebGLExtension.h"
+
+namespace WebCore {
+
+class EXTFragDepth final : public WebGLExtension {
+public:
+ explicit EXTFragDepth(WebGLRenderingContext*);
+ virtual ~EXTFragDepth();
+
+ virtual ExtensionName getName() const override;
+};
+
+} // namespace WebCore
+
+#endif // EXTFragDepth_h
Added: trunk/Source/WebCore/html/canvas/EXTFragDepth.idl (0 => 177194)
--- trunk/Source/WebCore/html/canvas/EXTFragDepth.idl (rev 0)
+++ trunk/Source/WebCore/html/canvas/EXTFragDepth.idl 2014-12-12 00:56:33 UTC (rev 177194)
@@ -0,0 +1,31 @@
+/*
+* Copyright (C) 2014 Apple Inc. All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+*
+* 1. Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* 2. Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in the
+* documentation and/or other materials provided with the distribution.
+*
+* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+* DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+[
+ NoInterfaceObject,
+ Conditional=WEBGL,
+ GenerateIsReachable=ImplWebGLRenderingContext
+] interface EXTFragDepth {
+};
Modified: trunk/Source/WebCore/html/canvas/WebGLExtension.h (177193 => 177194)
--- trunk/Source/WebCore/html/canvas/WebGLExtension.h 2014-12-12 00:46:19 UTC (rev 177193)
+++ trunk/Source/WebCore/html/canvas/WebGLExtension.h 2014-12-12 00:56:33 UTC (rev 177194)
@@ -36,6 +36,7 @@
// Extension names are needed to properly wrap instances in _javascript_ objects.
enum ExtensionName {
WebGLLoseContextName,
+ EXTFragDepthName,
EXTShaderTextureLODName,
EXTTextureFilterAnisotropicName,
EXTsRGBName,
Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp (177193 => 177194)
--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp 2014-12-12 00:46:19 UTC (rev 177193)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp 2014-12-12 00:56:33 UTC (rev 177194)
@@ -33,6 +33,7 @@
#include "CachedImage.h"
#include "DOMWindow.h"
#include "Document.h"
+#include "EXTFragDepth.h"
#include "EXTShaderTextureLOD.h"
#include "EXTTextureFilterAnisotropic.h"
#include "EXTsRGB.h"
@@ -2462,7 +2463,14 @@
}
return m_extsRGB.get();
}
-
+ if (equalIgnoringCase(name, "EXT_frag_depth")
+ && m_context->getExtensions()->supports("GL_EXT_frag_depth")) {
+ if (!m_extFragDepth) {
+ m_context->getExtensions()->ensureEnabled("GL_EXT_frag_depth");
+ m_extFragDepth = std::make_unique<EXTFragDepth>(this);
+ }
+ return m_extFragDepth.get();
+ }
if (equalIgnoringCase(name, "EXT_shader_texture_lod")
&& (m_context->getExtensions()->supports("GL_EXT_shader_texture_lod") || m_context->getExtensions()->supports("GL_ARB_shader_texture_lod"))) {
if (!m_extShaderTextureLOD) {
@@ -3081,6 +3089,8 @@
if (m_context->getExtensions()->supports("GL_EXT_sRGB"))
result.append("EXT_sRGB");
+ if (m_context->getExtensions()->supports("GL_EXT_frag_depth"))
+ result.append("EXT_frag_depth");
if (m_context->getExtensions()->supports("GL_OES_texture_float"))
result.append("OES_texture_float");
if (m_context->getExtensions()->supports("GL_OES_texture_float_linear"))
Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h (177193 => 177194)
--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h 2014-12-12 00:46:19 UTC (rev 177193)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.h 2014-12-12 00:56:33 UTC (rev 177194)
@@ -44,6 +44,7 @@
class EXTTextureFilterAnisotropic;
class EXTShaderTextureLOD;
class EXTsRGB;
+class EXTFragDepth;
class HTMLImageElement;
class HTMLVideoElement;
class ImageBuffer;
@@ -539,6 +540,7 @@
bool isContextLostOrPending();
// Enabled extension objects.
+ std::unique_ptr<EXTFragDepth> m_extFragDepth;
std::unique_ptr<EXTsRGB> m_extsRGB;
std::unique_ptr<EXTTextureFilterAnisotropic> m_extTextureFilterAnisotropic;
std::unique_ptr<EXTShaderTextureLOD> m_extShaderTextureLOD;
Modified: trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp (177193 => 177194)
--- trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp 2014-12-12 00:46:19 UTC (rev 177193)
+++ trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp 2014-12-12 00:56:33 UTC (rev 177194)
@@ -176,6 +176,13 @@
return m_availableExtensions.contains("GL_EXT_texture_sRGB") && (m_availableExtensions.contains("GL_EXT_framebuffer_sRGB") || m_availableExtensions.contains("GL_ARB_framebuffer_sRGB"));
#endif
+ if (name == "GL_EXT_frag_depth")
+#if PLATFORM(MAC)
+ return true;
+#else
+ return m_availableExtensions.contains("GL_EXT_frag_depth");
+#endif
+
// Desktop GL always supports GL_OES_rgb8_rgba8.
if (name == "GL_OES_rgb8_rgba8")
return true;
Modified: trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp (177193 => 177194)
--- trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp 2014-12-12 00:46:19 UTC (rev 177193)
+++ trunk/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp 2014-12-12 00:56:33 UTC (rev 177194)
@@ -144,6 +144,14 @@
ANGLEResources.EXT_shader_texture_lod = 1;
compiler.setResources(ANGLEResources);
}
+ } else if (name == "GL_EXT_frag_depth") {
+ // Enable support in ANGLE (if not enabled already)
+ ANGLEWebKitBridge& compiler = m_context->m_compiler;
+ ShBuiltInResources ANGLEResources = compiler.getResources();
+ if (!ANGLEResources.EXT_frag_depth) {
+ ANGLEResources.EXT_frag_depth = 1;
+ compiler.setResources(ANGLEResources);
+ }
}
}