TextureUnit code optimization
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Jul 2013 12:59:55 +0000 (12:59 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Jul 2013 12:59:55 +0000 (12:59 +0000)
commitd671b0eb3e3f1182356ce7bda1857fdb16b60418
treef92c28bbdde3320dd7296ea91aa483f786da8e8d
parent148997abc32a0b5ac111dc7756a122adae4b8b72
TextureUnit code optimization
https://bugs.webkit.org/show_bug.cgi?id=117868

Patch by Przemyslaw Szymanski <p.szymanski3@samsung.com> on 2013-07-03
Reviewed by Noam Rosenthal.

According to OpenGL ES 2.0 specification it is not possible to use both
texture2D and textureCubeMap in one texture unit.
This patch reduces amount of code, slightly increases rendering performance
and makes WebKit more consistent with OpenGL.

No new tests. Covered by existing tests:
LayoutTests/webgl/conformance/textures/tex-image-webgl.html
LayoutTests/webgl/conformance/textures/texture-complete.html

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::~WebGLRenderingContext):
(WebCore::WebGLRenderingContext::reshape):
(WebCore::WebGLRenderingContext::bindTexture):
(WebCore::WebGLRenderingContext::deleteTexture):
(WebCore::WebGLRenderingContext::getParameter):
(WebCore::WebGLRenderingContext::handleNPOTTextures):
(WebCore::WebGLRenderingContext::validateTextureBinding):
(WebCore::WebGLRenderingContext::restoreCurrentTexture2D):
* html/canvas/WebGLRenderingContext.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@152351 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/canvas/WebGLRenderingContext.cpp
Source/WebCore/html/canvas/WebGLRenderingContext.h