summaryrefslogtreecommitdiff
path: root/src/mbgl/gfx/rendering_stats.cpp
diff options
context:
space:
mode:
authorMikko Pulkki <mikko.pulkki@mapbox.com>2019-10-15 12:09:21 +0300
committerMikko Pulkki <55925868+mpulkki-mapbox@users.noreply.github.com>2019-10-30 14:32:27 +0200
commitfb062bb23e66af3d5a889b767aae380884b259e5 (patch)
tree4cb52d0a85e5eebbef4a340dce767c938e6052fa /src/mbgl/gfx/rendering_stats.cpp
parentc8576e089f12438a2384a4fe822af650e94ace74 (diff)
downloadqtlocation-mapboxgl-fb062bb23e66af3d5a889b767aae380884b259e5.tar.gz
[render-test] Add resource usage tracking to gfx context
Diffstat (limited to 'src/mbgl/gfx/rendering_stats.cpp')
-rw-r--r--src/mbgl/gfx/rendering_stats.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mbgl/gfx/rendering_stats.cpp b/src/mbgl/gfx/rendering_stats.cpp
new file mode 100644
index 0000000000..0a239ebd11
--- /dev/null
+++ b/src/mbgl/gfx/rendering_stats.cpp
@@ -0,0 +1,12 @@
+#include <mbgl/gfx/rendering_stats.hpp>
+
+namespace mbgl {
+namespace gfx {
+
+bool RenderingStats::isZero() const {
+ return numActiveTextures == 0 && numCreatedTextures == 0 && numBuffers == 0 && numFrameBuffers == 0 &&
+ memTextures == 0 && memIndexBuffers == 0 && memVertexBuffers == 0;
+}
+
+} // namespace gfx
+} // namespace mbgl \ No newline at end of file