Commit ae867077 authored by dino@apple.com's avatar dino@apple.com

[WebGL] Implement OES texture float linear

https://bugs.webkit.org/show_bug.cgi?id=124871

Reviewed by Brent Fulgham.

Source/WebCore:

Implement the OES_texture_float_linear extension. Generally
we'd also enable OES_texture_half_float_linear at the same
time, but that's blocked on webkit.org/b/110936.

Test: fast/canvas/webgl/oes-texture-float-linear.html

* CMakeLists.txt: Add new files.
* DerivedSources.cpp: Ditto.
* DerivedSources.make: Generate new file from IDL.
* GNUmakefile.list.am: Add new files.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: New files for OESTextureFloatLinear.

* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::toJS): Map the new name into the appropriate type.

* html/canvas/OESTextureFloatLinear.cpp: Added. This is a very simple class
that's mostly empty.
(WebCore::OESTextureFloatLinear::OESTextureFloatLinear):
(WebCore::OESTextureFloatLinear::~OESTextureFloatLinear):
(WebCore::OESTextureFloatLinear::getName):
(WebCore::OESTextureFloatLinear::create):
* html/canvas/OESTextureFloatLinear.h: Added.
* html/canvas/OESTextureFloatLinear.idl: Added.

* html/canvas/WebGLExtension.h: Declare the new name in the enum of extensions.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::drawArrays): Call new name.
(WebCore::WebGLRenderingContext::drawElements): Call new name.
(WebCore::WebGLRenderingContext::getExtension): Create the new extension if asked.
(WebCore::WebGLRenderingContext::checkTextureCompleteness): Renamed from handleNPOTTextures. Now
checks for the type of the texture too.
* html/canvas/WebGLRenderingContext.h: Member variable for new extension.

* html/canvas/WebGLTexture.cpp:
(WebCore::WebGLTexture::WebGLTexture):
(WebCore::WebGLTexture::needToUseBlackTexture): Takes an extra parameter which indicates
if it has an extension enabled.
(WebCore::WebGLTexture::update): Note it is a float type when updating.
* html/canvas/WebGLTexture.h: New flag to indicate float type.

* platform/graphics/Extensions3D.h: New flag type.
* platform/graphics/opengl/Extensions3DOpenGL.cpp:
(WebCore::Extensions3DOpenGL::supportsExtension): Add a comment about the extension.

LayoutTests:

Add the Khronos test files for this extension.

Add the JS test file for OES_texture_float_linear and OES_texture_half_float_linear
even though it's only used for the former at the moment.

* fast/canvas/webgl/oes-texture-float-linear.html: Added.
* fast/canvas/webgl/resources/oes-texture-float-and-half-float-linear.js: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160030 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 902a179d
2013-12-03 Dean Jackson <dino@apple.com>
[WebGL] Implement OES texture float linear
https://bugs.webkit.org/show_bug.cgi?id=124871
Reviewed by Brent Fulgham.
Add the Khronos test files for this extension.
Add the JS test file for OES_texture_float_linear and OES_texture_half_float_linear
even though it's only used for the former at the moment.
* fast/canvas/webgl/oes-texture-float-linear.html: Added.
* fast/canvas/webgl/resources/oes-texture-float-and-half-float-linear.js: Added.
2013-12-03 Alexey Proskuryakov <ap@apple.com>
Support exporting private WebCrypto RSA keys
......
<!--
/*
** Copyright (c) 2013 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
** "Materials"), to deal in the Materials without restriction, including
** without limitation the rights to use, copy, modify, merge, publish,
** distribute, sublicense, and/or sell copies of the Materials, and to
** permit persons to whom the Materials are furnished to do so, subject to
** the following conditions:
**
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Materials.
**
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
*/
-->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="../../../resources/js-test-pre.js"></script>
<script src="resources/webgl-test.js"></script>
<script src="resources/webgl-test-utils.js"></script>
<script src="resources/oes-texture-float-and-half-float-linear.js"></script>
<script>
"use strict";
function testPrologue(gl, extensionTypeName) {
if (!gl.getExtension(extensionTypeName)) {
testPassed("No " + extensionTypeName + " support -- this is legal");
return false;
}
testPassed("Successfully enabled " + extensionTypeName + " extension");
return true;
}
</script>
</head>
<body onload='generateTest("OES_texture_float", "OES_texture_float_linear", "FLOAT", testPrologue)()'>
<div id="description"></div>
<canvas id="canvas" style="width: 50px; height: 50px;"> </canvas>
<div id="console"></div>
</body>
</html>
/*
** Copyright (c) 2013 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
** "Materials"), to deal in the Materials without restriction, including
** without limitation the rights to use, copy, modify, merge, publish,
** distribute, sublicense, and/or sell copies of the Materials, and to
** permit persons to whom the Materials are furnished to do so, subject to
** the following conditions:
**
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Materials.
**
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
*/
function generateTest(extensionTypeName, extensionName, pixelType, prologue) {
var wtu = WebGLTestUtils;
var gl = null;
var successfullyParsed = false;
var init = function()
{
description("This test verifies the functionality of the " + extensionName + " extension, if it is available.");
var canvas = document.getElementById("canvas");
gl = wtu.create3DContext(canvas);
if (!prologue(gl, extensionTypeName)) {
finishTest();
return;
}
// Before the extension is enabled
var extensionEnabled = false;
runTestSuite(extensionEnabled);
if (!gl.getExtension(extensionName))
testPassed("No " + extensionName + " support -- this is legal");
else {
// After the extension is enabled
extensionEnabled = true;
runTestSuite(extensionEnabled);
}
finishTest();
}
function runTestSuite(extensionEnabled)
{
var magF = [gl.NEAREST, gl.LINEAR];
var minF = [gl.NEAREST, gl.LINEAR, gl.NEAREST_MIPMAP_NEAREST, gl.NEAREST_MIPMAP_LINEAR, gl.LINEAR_MIPMAP_NEAREST, gl.LINEAR_MIPMAP_LINEAR];
var tex2DFShader = [
'uniform sampler2D tex;',
'void main() {',
' gl_FragData[0] = texture2D(tex, vec2(0.5, 0.5)) * vec4(4.0, 2.0, 2.0, 1);',
'}'].join('\n');
var positionVertexShader = [
'attribute vec4 vPosition;',
'void main() {',
' gl_Position = vPosition;',
'}'].join('\n');
var texCubeFShader = [
'uniform samplerCube tex;',
'void main() {',
' gl_FragColor = textureCube(tex, normalize(vec3(0.5, 0.5, 1))) * vec4(4.0, 2.0, 2.0, 1);',
'}'].join('\n');
var vs = wtu.loadShader(gl, positionVertexShader, gl.VERTEX_SHADER);
var fs_2d = wtu.loadShader(gl, tex2DFShader, gl.FRAGMENT_SHADER);
var fs_cube = wtu.loadShader(gl, texCubeFShader, gl.FRAGMENT_SHADER);
// TEXTURE_2D
var program = wtu.setupProgram(gl, [vs, fs_2d]);
gl.useProgram(program);
wtu.setupUnitQuad(gl);
for (var kk = 0; kk < 2; ++kk) {
for (var ii = 0; ii < 6; ++ii) {
var linear = false;
if (magF[kk] == gl.LINEAR || (minF[ii] != gl.NEAREST && minF[ii] != gl.NEAREST_MIPMAP_NEAREST))
linear = true;
var color = (!extensionEnabled && linear) ? [0, 0, 0, 255] : [255, 255, 255, 255];
runEachTest(gl.TEXTURE_2D, magF[kk], minF[ii], linear, extensionEnabled, color);
}
}
// TEXTURE_CUBE_MAP
var programCube = wtu.setupProgram(gl, [vs, fs_cube]);
gl.useProgram(programCube);
wtu.setupUnitQuad(gl);
for (var kk = 0; kk < 2; ++kk) {
for (var ii = 0; ii < 6; ++ii) {
var linear = false;
if (magF[kk] == gl.LINEAR || (minF[ii] != gl.NEAREST && minF[ii] != gl.NEAREST_MIPMAP_NEAREST))
linear = true;
var color = (!extensionEnabled && linear) ? [0, 0, 0, 255] : [255, 255, 255, 255];
runEachTest(gl.TEXTURE_CUBE_MAP, magF[kk], minF[ii], linear, extensionEnabled, color);
}
}
}
function runEachTest(textureTarget, magFilter, minFilter, linear, extensionEnabled, expected)
{
var format = gl.RGBA;
var numberOfChannels = 4;
debug("");
debug("testing target: " + wtu.glEnumToString(gl,textureTarget) +
", testing format: " + wtu.glEnumToString(gl, format) +
", magFilter is: " + wtu.glEnumToString(gl, magFilter) +
", minFilter is: " + wtu.glEnumToString(gl, minFilter) +
", " + extensionName + " is " + (extensionEnabled ? "enabled": "not enabled")
);
// Generate data.
var width = 4;
var height = 4;
var canvas2d = document.createElement('canvas');
canvas2d.width = width;
canvas2d.height = height;
var ctx2d = canvas2d.getContext('2d');
var color = [64, 128, 128, 255];
ctx2d.fillStyle = "rgba(" + color[0] + "," + color[1] + "," + color[2] + "," + color[3] + ")";
ctx2d.fillRect(0, 0, width, height);
var texture = gl.createTexture();
gl.bindTexture(textureTarget, texture);
gl.texParameteri(textureTarget, gl.TEXTURE_MAG_FILTER, magFilter);
gl.texParameteri(textureTarget, gl.TEXTURE_MIN_FILTER, minFilter);
gl.texParameteri(textureTarget, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
gl.texParameteri(textureTarget, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
if (textureTarget == gl.TEXTURE_2D) {
gl.texImage2D(gl.TEXTURE_2D, 0, format, format, gl[pixelType], canvas2d);
if (minFilter != gl.NEAREST && minFilter != gl.LINEAR)
gl.generateMipmap(gl.TEXTURE_2D);
}
else if (textureTarget == gl.TEXTURE_CUBE_MAP) {
var targets = [
gl.TEXTURE_CUBE_MAP_POSITIVE_X,
gl.TEXTURE_CUBE_MAP_NEGATIVE_X,
gl.TEXTURE_CUBE_MAP_POSITIVE_Y,
gl.TEXTURE_CUBE_MAP_NEGATIVE_Y,
gl.TEXTURE_CUBE_MAP_POSITIVE_Z,
gl.TEXTURE_CUBE_MAP_NEGATIVE_Z];
for (var tt = 0; tt < targets.length; ++tt)
gl.texImage2D(targets[tt], 0, format, format, gl[pixelType], canvas2d);
if (minFilter != gl.NEAREST && minFilter != gl.LINEAR)
gl.generateMipmap(gl.TEXTURE_CUBE_MAP);
}
wtu.drawQuad(gl);
if (!linear) {
wtu.glErrorShouldBe(gl, gl.NO_ERROR, extensionTypeName + " texture with non-Linear filter should succeed with NO_ERROR no matter whether " + extensionName + " is enabled or not");
} else if (!extensionEnabled) {
wtu.glErrorShouldBe(gl, gl.NO_ERROR, extensionTypeName + " texture with Linear filter should produce [0, 0, 0, 1.0] with NO_ERROR if " + extensionName + " isn't enabled");
} else {
wtu.glErrorShouldBe(gl, gl.NO_ERROR, extensionTypeName + " texture with Linear filter should succeed with NO_ERROR if " + extensionTypeName + " is enabled");
}
wtu.checkCanvas(gl, expected, "should be " + expected[0] + "," + expected[1] + "," + expected[2] + "," + expected[3]);
}
return init;
}
......@@ -502,6 +502,7 @@ set(WebCore_IDL_FILES
html/canvas/OESElementIndexUint.idl
html/canvas/OESStandardDerivatives.idl
html/canvas/OESTextureFloat.idl
html/canvas/OESTextureFloatLinear.idl
html/canvas/OESTextureHalfFloat.idl
html/canvas/OESVertexArrayObject.idl
html/canvas/WebGLActiveInfo.idl
......@@ -1491,6 +1492,7 @@ set(WebCore_SOURCES
html/canvas/OESElementIndexUint.cpp
html/canvas/OESStandardDerivatives.cpp
html/canvas/OESTextureFloat.cpp
html/canvas/OESTextureFloatLinear.cpp
html/canvas/OESTextureHalfFloat.cpp
html/canvas/OESVertexArrayObject.cpp
html/canvas/WebGLBuffer.cpp
......@@ -2657,6 +2659,7 @@ if (ENABLE_WEBGL)
html/canvas/OESElementIndexUint.cpp
html/canvas/OESStandardDerivatives.cpp
html/canvas/OESTextureFloat.cpp
html/canvas/OESTextureFloatLinear.cpp
html/canvas/OESTextureHalfFloat.cpp
html/canvas/OESVertexArrayObject.cpp
html/canvas/WebGLBuffer.cpp
......@@ -2691,6 +2694,7 @@ if (ENABLE_WEBGL)
html/canvas/OESElementIndexUint.idl
html/canvas/OESStandardDerivatives.idl
html/canvas/OESTextureFloat.idl
html/canvas/OESTextureFloatLinear.idl
html/canvas/OESTextureHalfFloat.idl
html/canvas/OESVertexArrayObject.idl
html/canvas/WebGLActiveInfo.idl
......
2013-12-03 Dean Jackson <dino@apple.com>
[WebGL] Implement OES texture float linear
https://bugs.webkit.org/show_bug.cgi?id=124871
Reviewed by Brent Fulgham.
Implement the OES_texture_float_linear extension. Generally
we'd also enable OES_texture_half_float_linear at the same
time, but that's blocked on webkit.org/b/110936.
Test: fast/canvas/webgl/oes-texture-float-linear.html
* CMakeLists.txt: Add new files.
* DerivedSources.cpp: Ditto.
* DerivedSources.make: Generate new file from IDL.
* GNUmakefile.list.am: Add new files.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: New files for OESTextureFloatLinear.
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::toJS): Map the new name into the appropriate type.
* html/canvas/OESTextureFloatLinear.cpp: Added. This is a very simple class
that's mostly empty.
(WebCore::OESTextureFloatLinear::OESTextureFloatLinear):
(WebCore::OESTextureFloatLinear::~OESTextureFloatLinear):
(WebCore::OESTextureFloatLinear::getName):
(WebCore::OESTextureFloatLinear::create):
* html/canvas/OESTextureFloatLinear.h: Added.
* html/canvas/OESTextureFloatLinear.idl: Added.
* html/canvas/WebGLExtension.h: Declare the new name in the enum of extensions.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::drawArrays): Call new name.
(WebCore::WebGLRenderingContext::drawElements): Call new name.
(WebCore::WebGLRenderingContext::getExtension): Create the new extension if asked.
(WebCore::WebGLRenderingContext::checkTextureCompleteness): Renamed from handleNPOTTextures. Now
checks for the type of the texture too.
* html/canvas/WebGLRenderingContext.h: Member variable for new extension.
* html/canvas/WebGLTexture.cpp:
(WebCore::WebGLTexture::WebGLTexture):
(WebCore::WebGLTexture::needToUseBlackTexture): Takes an extra parameter which indicates
if it has an extension enabled.
(WebCore::WebGLTexture::update): Note it is a float type when updating.
* html/canvas/WebGLTexture.h: New flag to indicate float type.
* platform/graphics/Extensions3D.h: New flag type.
* platform/graphics/opengl/Extensions3DOpenGL.cpp:
(WebCore::Extensions3DOpenGL::supportsExtension): Add a comment about the extension.
2013-12-03 Alexey Proskuryakov <ap@apple.com>
Support exporting private WebCrypto RSA keys
......@@ -43,6 +43,7 @@
#include "JSOESElementIndexUint.cpp"
#include "JSOESStandardDerivatives.cpp"
#include "JSOESTextureFloat.cpp"
#include "JSOESTextureFloatLinear.cpp"
#include "JSOESTextureHalfFloat.cpp"
#include "JSOESVertexArrayObject.cpp"
#include "JSWebGLActiveInfo.cpp"
......
......@@ -419,6 +419,7 @@ BINDING_IDLS = \
$(WebCore)/html/canvas/OESElementIndexUint.idl \
$(WebCore)/html/canvas/OESStandardDerivatives.idl \
$(WebCore)/html/canvas/OESTextureFloat.idl \
$(WebCore)/html/canvas/OESTextureFloatLinear.idl \
$(WebCore)/html/canvas/OESTextureHalfFloat.idl \
$(WebCore)/html/canvas/OESVertexArrayObject.idl \
$(WebCore)/html/canvas/WebGLActiveInfo.idl \
......
......@@ -543,6 +543,8 @@ webcore_built_sources += \
DerivedSources/WebCore/JSOESStandardDerivatives.h \
DerivedSources/WebCore/JSOESTextureFloat.cpp \
DerivedSources/WebCore/JSOESTextureFloat.h \
DerivedSources/WebCore/JSOESTextureFloatLinear.cpp \
DerivedSources/WebCore/JSOESTextureFloatLinear.h \
DerivedSources/WebCore/JSOESTextureHalfFloat.cpp \
DerivedSources/WebCore/JSOESTextureHalfFloat.h \
DerivedSources/WebCore/JSOESVertexArrayObject.cpp \
......@@ -1509,6 +1511,7 @@ dom_binding_idls += \
$(WebCore)/html/canvas/EXTTextureFilterAnisotropic.idl \
$(WebCore)/html/canvas/OESStandardDerivatives.idl \
$(WebCore)/html/canvas/OESTextureFloat.idl \
$(WebCore)/html/canvas/OESTextureFloatLinear.idl \
$(WebCore)/html/canvas/OESTextureHalfFloat.idl \
$(WebCore)/html/canvas/OESVertexArrayObject.idl \
$(WebCore)/html/canvas/OESElementIndexUint.idl \
......@@ -3245,6 +3248,8 @@ webcore_sources += \
Source/WebCore/html/canvas/OESStandardDerivatives.h \
Source/WebCore/html/canvas/OESTextureFloat.cpp \
Source/WebCore/html/canvas/OESTextureFloat.h \
Source/WebCore/html/canvas/OESTextureFloatLinear.cpp \
Source/WebCore/html/canvas/OESTextureFloatLinear.h \
Source/WebCore/html/canvas/OESTextureHalfFloat.cpp \
Source/WebCore/html/canvas/OESTextureHalfFloat.h \
Source/WebCore/html/canvas/OESVertexArrayObject.cpp \
......
......@@ -340,6 +340,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\JSOESTextureFloatLinear.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="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSOESTextureHalfFloat.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
......@@ -6501,6 +6515,7 @@
<ClCompile Include="..\html\canvas\OESElementIndexUint.cpp" />
<ClCompile Include="..\html\canvas\OESStandardDerivatives.cpp" />
<ClCompile Include="..\html\canvas\OESTextureFloat.cpp" />
<ClCompile Include="..\html\canvas\OESTextureFloatLinear.cpp" />
<ClCompile Include="..\html\canvas\OESTextureHalfFloat.cpp" />
<ClCompile Include="..\html\canvas\OESVertexArrayObject.cpp" />
<ClCompile Include="..\html\canvas\WebGLBuffer.cpp" />
......@@ -18533,6 +18548,7 @@
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSOESElementIndexUint.h" />
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSOESStandardDerivatives.h" />
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSOESTextureFloat.h" />
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSOESTextureFloatLinear.h" />
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSOESTextureHalfFloat.h" />
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSOESVertexArrayObject.h" />
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSWebGLActiveInfo.h" />
......@@ -18614,6 +18630,7 @@
<ClInclude Include="..\html\canvas\OESElementIndexUint.h" />
<ClInclude Include="..\html\canvas\OESStandardDerivatives.h" />
<ClInclude Include="..\html\canvas\OESTextureFloat.h" />
<ClInclude Include="..\html\canvas\OESTextureFloatLinear.h" />
<ClInclude Include="..\html\canvas\OESTextureHalfFloat.h" />
<ClInclude Include="..\html\canvas\OESVertexArrayObject.h" />
<ClInclude Include="..\html\canvas\WebGLActiveInfo.h" />
......@@ -6625,6 +6625,9 @@
<ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSOESTextureFloat.cpp">
<Filter>DerivedSources</Filter>
</ClCompile>
<ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSOESTextureFloatLinear.cpp">
<Filter>DerivedSources</Filter>
</ClCompile>
<ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSOESTextureHalfFloat.cpp">
<Filter>DerivedSources</Filter>
</ClCompile>
......@@ -6715,6 +6718,9 @@
<ClCompile Include="..\html\canvas\OESTextureFloat.cpp">
<Filter>html\canvas</Filter>
</ClCompile>
<ClCompile Include="..\html\canvas\OESTextureFloatLinear.cpp">
<Filter>html\canvas</Filter>
</ClCompile>
<ClCompile Include="..\html\canvas\OESTextureHalfFloat.cpp">
<Filter>html\canvas</Filter>
</ClCompile>
......@@ -14402,6 +14408,9 @@
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSOESTextureFloat.h">
<Filter>DerivedSources</Filter>
</ClInclude>
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSOESTextureFloatLinear.h">
<Filter>DerivedSources</Filter>
</ClInclude>
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSOESTextureHalfFloat.h">
<Filter>DerivedSources</Filter>
</ClInclude>
......@@ -14495,6 +14504,9 @@
<ClInclude Include="..\html\canvas\OESTextureFloat.h">
<Filter>html\canvas</Filter>
</ClInclude>
<ClInclude Include="..\html\canvas\OESTextureFloatLinear.h">
<Filter>html\canvas</Filter>
</ClInclude>
<ClInclude Include="..\html\canvas\OESTextureHalfFloat.h">
<Filter>html\canvas</Filter>
</ClInclude>
......
......@@ -1066,6 +1066,10 @@
31313F651443B35F006E2A90 /* FilterEffectRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31313F631443B35E006E2A90 /* FilterEffectRenderer.cpp */; };
31313F661443B35F006E2A90 /* FilterEffectRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = 31313F641443B35E006E2A90 /* FilterEffectRenderer.h */; };
3138A9E51474434600B0ED12 /* StyleShader.h in Headers */ = {isa = PBXBuildFile; fileRef = 3138A9E41474434600B0ED12 /* StyleShader.h */; };
3146FE6E184420A8001A937C /* OESTextureFloatLinear.h in Headers */ = {isa = PBXBuildFile; fileRef = 3146FE6618442087001A937C /* OESTextureFloatLinear.h */; };
3146FE6F184420AA001A937C /* OESTextureFloatLinear.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3146FE6518442087001A937C /* OESTextureFloatLinear.cpp */; };
3146FE7418442370001A937C /* JSOESTextureFloatLinear.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3146FE7018442367001A937C /* JSOESTextureFloatLinear.cpp */; };
3146FE7518442370001A937C /* JSOESTextureFloatLinear.h in Headers */ = {isa = PBXBuildFile; fileRef = 3146FE7118442367001A937C /* JSOESTextureFloatLinear.h */; };
316023F01532C40C00D50FF4 /* Dictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 316023EF1532C40C00D50FF4 /* Dictionary.h */; settings = {ATTRIBUTES = (Private, ); }; };
31611E5A0E1C4DE000F6A579 /* JSWebKitCSSTransformValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31611E580E1C4DE000F6A579 /* JSWebKitCSSTransformValue.cpp */; };
31611E5B0E1C4DE000F6A579 /* JSWebKitCSSTransformValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 31611E590E1C4DE000F6A579 /* JSWebKitCSSTransformValue.h */; };
......@@ -7718,6 +7722,11 @@
31313F631443B35E006E2A90 /* FilterEffectRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FilterEffectRenderer.cpp; sourceTree = "<group>"; };
31313F641443B35E006E2A90 /* FilterEffectRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FilterEffectRenderer.h; sourceTree = "<group>"; };
3138A9E41474434600B0ED12 /* StyleShader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StyleShader.h; path = style/StyleShader.h; sourceTree = "<group>"; };
3146FE6518442087001A937C /* OESTextureFloatLinear.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OESTextureFloatLinear.cpp; path = canvas/OESTextureFloatLinear.cpp; sourceTree = "<group>"; };
3146FE6618442087001A937C /* OESTextureFloatLinear.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OESTextureFloatLinear.h; path = canvas/OESTextureFloatLinear.h; sourceTree = "<group>"; };
3146FE6718442087001A937C /* OESTextureFloatLinear.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = OESTextureFloatLinear.idl; path = canvas/OESTextureFloatLinear.idl; sourceTree = "<group>"; };
3146FE7018442367001A937C /* JSOESTextureFloatLinear.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSOESTextureFloatLinear.cpp; path = JSOESTextureFloatLinear.cpp; sourceTree = "<group>"; };
3146FE7118442367001A937C /* JSOESTextureFloatLinear.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSOESTextureFloatLinear.h; path = JSOESTextureFloatLinear.h; sourceTree = "<group>"; };
316023EF1532C40C00D50FF4 /* Dictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Dictionary.h; sourceTree = "<group>"; };
31611E540E1C4D4A00F6A579 /* WebKitCSSTransformValue.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebKitCSSTransformValue.idl; sourceTree = "<group>"; };
31611E580E1C4DE000F6A579 /* JSWebKitCSSTransformValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebKitCSSTransformValue.cpp; sourceTree = "<group>"; };
......@@ -14964,6 +14973,9 @@
6EBF0E4512A8926100DB1709 /* OESTextureFloat.cpp */,
6EBF0E4612A8926100DB1709 /* OESTextureFloat.h */,
6EBF0E4712A8926100DB1709 /* OESTextureFloat.idl */,
3146FE6518442087001A937C /* OESTextureFloatLinear.cpp */,
3146FE6618442087001A937C /* OESTextureFloatLinear.h */,
3146FE6718442087001A937C /* OESTextureFloatLinear.idl */,
A31C4E4C16E02AA6002F7957 /* OESTextureHalfFloat.cpp */,
A31C4E4E16E02AB4002F7957 /* OESTextureHalfFloat.h */,
A31C4E5016E02AC5002F7957 /* OESTextureHalfFloat.idl */,
......@@ -17693,6 +17705,8 @@
9001787F12E0370700648462 /* JSOESStandardDerivatives.h */,
6EBF0E7412A9868800DB1709 /* JSOESTextureFloat.cpp */,
6EBF0E7512A9868800DB1709 /* JSOESTextureFloat.h */,
3146FE7018442367001A937C /* JSOESTextureFloatLinear.cpp */,
3146FE7118442367001A937C /* JSOESTextureFloatLinear.h */,
A31C4E5116E02B08002F7957 /* JSOESTextureHalfFloat.cpp */,
A31C4E5316E02B40002F7957 /* JSOESTextureHalfFloat.h */,
77A17AA212F28B2A004E02F6 /* JSOESVertexArrayObject.cpp */,
......@@ -23449,6 +23463,7 @@
59A86008119DAFA100DEF1EF /* JSDeviceOrientationEvent.h in Headers */,
BCE4389C140B1BA8005E437E /* JSDictionary.h in Headers */,
E4AE7C1A17D232350009FB31 /* ElementAncestorIterator.h in Headers */,
3146FE7518442370001A937C /* JSOESTextureFloatLinear.h in Headers */,
659DDC8309E198BA001BF3C6 /* JSDocument.h in Headers */,
1A494EDF0A123F4C00FDAFC1 /* JSDocumentFragment.h in Headers */,
65DF31F609D1CC60000BE325 /* JSDocumentType.h in Headers */,
......@@ -23710,6 +23725,7 @@
B2FA3D390AB75A6F000E5AC4 /* JSSVGAnimatedAngle.h in Headers */,
B2FA3D3B0AB75A6F000E5AC4 /* JSSVGAnimatedBoolean.h in Headers */,
B2FA3D3D0AB75A6F000E5AC4 /* JSSVGAnimatedEnumeration.h in Headers */,
3146FE6E184420A8001A937C /* OESTextureFloatLinear.h in Headers */,
B2FA3D3F0AB75A6F000E5AC4 /* JSSVGAnimatedInteger.h in Headers */,
B2FA3D410AB75A6F000E5AC4 /* JSSVGAnimatedLength.h in Headers */,
B2FA3D430AB75A6F000E5AC4 /* JSSVGAnimatedLengthList.h in Headers */,
......@@ -25807,6 +25823,7 @@
93309DDC099E64920056E581 /* CompositeEditCommand.cpp in Sources */,
79F2F5A11091939A000D87CB /* CompositionEvent.cpp in Sources */,
FD31608E12B026F700C1A359 /* Cone.cpp in Sources */,
3146FE6F184420AA001A937C /* OESTextureFloatLinear.cpp in Sources */,
BC0B36A40CD3C67C00AC7EB5 /* Console.cpp in Sources */,
41F0618F0F5F069800A07EAC /* ConsoleMessage.cpp in Sources */,
A818721F0977D3C0005826D9 /* ContainerNode.cpp in Sources */,
......@@ -26492,6 +26509,7 @@
A871DC260A15205700B12A68 /* HTMLStyleElement.cpp in Sources */,
D3D4E972130C7CFE007BA540 /* HTMLSummaryElement.cpp in Sources */,
A871DB320A150BD600B12A68 /* HTMLTableCaptionElement.cpp in Sources */,
3146FE7418442370001A937C /* JSOESTextureFloatLinear.cpp in Sources */,
A871DB2E0A150BD600B12A68 /* HTMLTableCellElement.cpp in Sources */,
A871DB290A150BD600B12A68 /* HTMLTableColElement.cpp in Sources */,
A871DB280A150BD600B12A68 /* HTMLTableElement.cpp in Sources */,
......@@ -42,6 +42,7 @@
#include "JSOESElementIndexUint.h"
#include "JSOESStandardDerivatives.h"
#include "JSOESTextureFloat.h"
#include "JSOESTextureFloatLinear.h"
#include "JSOESTextureHalfFloat.h"
#include "JSOESVertexArrayObject.h"
#include "JSWebGLBuffer.h"
......@@ -64,6 +65,7 @@
#include "OESElementIndexUint.h"
#include "OESStandardDerivatives.h"
#include "OESTextureFloat.h"
#include "OESTextureFloatLinear.h"
#include "OESTextureHalfFloat.h"
#include "OESVertexArrayObject.h"
#include "WebGLBuffer.h"
......@@ -207,6 +209,8 @@ static JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, WebGLExten
return toJS(exec, globalObject, static_cast<OESStandardDerivatives*>(extension));
case WebGLExtension::OESTextureFloatName:
return toJS(exec, globalObject, static_cast<OESTextureFloat*>(extension));
case WebGLExtension::OESTextureFloatLinearName:
return toJS(exec, globalObject, static_cast<OESTextureFloatLinear*>(extension));
case WebGLExtension::OESTextureHalfFloatName:
return toJS(exec, globalObject, static_cast<OESTextureHalfFloat*>(extension));
case WebGLExtension::OESVertexArrayObjectName:
......
/*
* Copyright (C) 2013 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 INC. 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 INC. 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 "OESTextureFloatLinear.h"
namespace WebCore {
OESTextureFloatLinear::OESTextureFloatLinear(WebGLRenderingContext* context)
: WebGLExtension(context)
{
}
OESTextureFloatLinear::~OESTextureFloatLinear()
{
}
WebGLExtension::ExtensionName OESTextureFloatLinear::getName() const
{
return OESTextureFloatLinearName;
}
OwnPtr<OESTextureFloatLinear> OESTextureFloatLinear::create(WebGLRenderingContext* context)
{
return adoptPtr(new OESTextureFloatLinear(context));
}
} // namespace WebCore
#endif // ENABLE(WEBGL)
/*
* Copyright (C) 2013 Apple Inc. All rights reserved.
*