Bugzilla – Attachment 819 Details for
Bug 1101
Memory leak on TextRenderer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Cleaned up Patch from original proposal
Bug1101-TextRenderer.diff (text/plain), 2.49 KB, created by
Sven Gothel
on 2019-08-20 18:48:24 CEST
(
hide
)
Description:
Cleaned up Patch from original proposal
Filename:
MIME Type:
Creator:
Sven Gothel
Created:
2019-08-20 18:48:24 CEST
Size:
2.49 KB
patch
obsolete
>diff --git a/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java b/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java >index 38bac06cc..0fc36a249 100644 >--- a/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java >+++ b/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java >@@ -42,7 +42,6 @@ package com.jogamp.opengl.util.awt; > import com.jogamp.common.nio.Buffers; > import com.jogamp.common.util.InterruptSource; > import com.jogamp.common.util.PropertyAccess; >-import com.jogamp.opengl.GLExtensions; > import com.jogamp.opengl.util.*; > import com.jogamp.opengl.util.packrect.*; > import com.jogamp.opengl.util.texture.*; >@@ -566,6 +565,9 @@ public class TextRenderer { > @throws GLException If an OpenGL context is not current when this method is called > */ > public void dispose() throws GLException { >+ if( null != mPipelinedQuadRenderer ) { >+ mPipelinedQuadRenderer.dispose(); >+ } > packer.dispose(); > packer = null; > cachedBackingStore = null; >@@ -1862,7 +1864,7 @@ public class TextRenderer { > gl.glTexCoordPointer(2, GL.GL_FLOAT, 0, mTexCoords); > } > >- gl.glDrawArrays(GL2GL3.GL_QUADS, 0, >+ gl.glDrawArrays(GL2ES3.GL_QUADS, 0, > mOutstandingGlyphsVerticesPipeline); > > mVertCoords.rewind(); >@@ -1877,7 +1879,7 @@ public class TextRenderer { > renderer.getTexture(); // triggers texture uploads. Maybe this should be more obvious? > > final GL2 gl = GLContext.getCurrentGL().getGL2(); >- gl.glBegin(GL2GL3.GL_QUADS); >+ gl.glBegin(GL2ES3.GL_QUADS); > > try { > final int numberOfQuads = mOutstandingGlyphsVerticesPipeline / 4; >@@ -1911,6 +1913,14 @@ public class TextRenderer { > } > } > } >+ >+ public void dispose() { >+ final GL2 gl = GLContext.getCurrentGL().getGL2(); >+ final int[] vbos = new int[2]; >+ vbos[0] = mVBO_For_ResuableTileVertices; >+ vbos[1] = mVBO_For_ResuableTileTexCoords; >+ gl.glDeleteBuffers(2, IntBuffer.wrap(vbos)); >+ } > } > > class DebugListener implements GLEventListener { >@@ -1950,6 +1960,8 @@ public class TextRenderer { > > @Override > public void dispose(final GLAutoDrawable drawable) { >+ mPipelinedQuadRenderer.dispose(); >+ // n/a glu.destroy(); ?? > glu=null; > frame=null; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1101
:
665
| 819