[render-test] Add resource usage tracking to gfx context

This commit is contained in:
Mikko Pulkki
2019-10-15 12:09:21 +03:00
committed by Mikko Pulkki
parent c8576e089f
commit fb062bb23e
16 changed files with 176 additions and 14 deletions

View File

@@ -0,0 +1,14 @@
#include <mbgl/gl/context.hpp>
#include <mbgl/gl/vertex_buffer_resource.hpp>
namespace mbgl {
namespace gl {
VertexBufferResource::~VertexBufferResource() {
auto& stats = buffer.get_deleter().context.renderingStats();
stats.memVertexBuffers -= byteSize;
assert(stats.memVertexBuffers >= 0);
}
} // namespace gl
} // namespace mbgl