From cca2782818bec79f63a5da1719b11e15244dbea2 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 20 May 2014 01:02:27 +0200 Subject: Bug 801: Refine commit 9a15aad0e5388a4b927e44d3d2ce136f32474bc2 cache TextureSequence's fragment shader hash-code Adding TextureSequence.getTextureFragmentShaderHashCode() allowing to use a cached hash-code (performance, interface usability). Implemented in GLMediaPlayerImpl and ImageSequence. --- src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/jogl/classes/com/jogamp/graph') diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java index 438895d8e..bb191e651 100644 --- a/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java +++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java @@ -394,9 +394,7 @@ public class RegionRenderer { final boolean pass1, final int quality, final int sampleCount, final TextureSequence colorTexSeq) { final int colorTexSeqHash; if( null != colorTexSeq ) { - int hash = 31 + colorTexSeq.getTextureLookupFragmentShaderImpl().hashCode(); - hash = ((hash << 5) - hash) + colorTexSeq.getTextureSampler2DType().hashCode(); - colorTexSeqHash = hash; + colorTexSeqHash = colorTexSeq.getTextureFragmentShaderHashCode(); } else { colorTexSeqHash = 0; } -- cgit v1.2.3