reset static buffer-usage-count on init, formatting..
This commit is contained in:
parent
004ad338ae
commit
59533d823b
@ -26,11 +26,8 @@ public final class BufferObject {
|
|||||||
private static final int MB = 1024 * 1024;
|
private static final int MB = 1024 * 1024;
|
||||||
private static final int LIMIT_BUFFERS = 16 * MB;
|
private static final int LIMIT_BUFFERS = 16 * MB;
|
||||||
|
|
||||||
|
// GL identifier
|
||||||
// -------------------------------------------------------------
|
|
||||||
// GL id
|
|
||||||
public int id;
|
public int id;
|
||||||
|
|
||||||
// allocated bytes
|
// allocated bytes
|
||||||
public int size;
|
public int size;
|
||||||
|
|
||||||
@ -83,7 +80,9 @@ public final class BufferObject {
|
|||||||
if (mBufferMemoryUsage < LIMIT_BUFFERS)
|
if (mBufferMemoryUsage < LIMIT_BUFFERS)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Log.d(TAG, "buffer object usage: " + mBufferMemoryUsage / MB + "MB");
|
Log.d(TAG, "buffer object usage: "
|
||||||
|
+ mBufferMemoryUsage / MB
|
||||||
|
+ "MB, force: " + force);
|
||||||
|
|
||||||
mBufferMemoryUsage -= BufferObject.limitUsage(1024 * 1024);
|
mBufferMemoryUsage -= BufferObject.limitUsage(1024 * 1024);
|
||||||
|
|
||||||
@ -187,6 +186,7 @@ public final class BufferObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static synchronized void init(int num) {
|
static synchronized void init(int num) {
|
||||||
|
mBufferMemoryUsage = 0;
|
||||||
pool = null;
|
pool = null;
|
||||||
createBuffers(num);
|
createBuffers(num);
|
||||||
counter = num;
|
counter = num;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user