summaryrefslogtreecommitdiff
path: root/include/mbgl/gfx
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-12-17 15:50:09 +0200
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-12-18 13:48:52 +0200
commit648392585e47806e325e4d850b9c3b28562420a3 (patch)
treedab1f037d17bc9f9dcb2155fca73465c1153f730 /include/mbgl/gfx
parent64a37ceb0547a6ac48196426c513a8fdd6e57f70 (diff)
downloadqtlocation-mapboxgl-648392585e47806e325e4d850b9c3b28562420a3.tar.gz
[test runner] Show all tiles independently in Tile mode
Diffstat (limited to 'include/mbgl/gfx')
-rw-r--r--include/mbgl/gfx/rendering_stats.hpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/mbgl/gfx/rendering_stats.hpp b/include/mbgl/gfx/rendering_stats.hpp
index 8fb01a5825..7cc3edca61 100644
--- a/include/mbgl/gfx/rendering_stats.hpp
+++ b/include/mbgl/gfx/rendering_stats.hpp
@@ -16,7 +16,22 @@ struct RenderingStats {
int memTextures;
int memIndexBuffers;
int memVertexBuffers;
+
+ RenderingStats& operator+=(const RenderingStats& right);
};
+inline RenderingStats& RenderingStats::operator+=(const RenderingStats& r) {
+ numDrawCalls += r.numDrawCalls;
+ numActiveTextures += r.numActiveTextures;
+ numCreatedTextures += r.numCreatedTextures;
+ numBuffers += r.numBuffers;
+ numFrameBuffers += r.numFrameBuffers;
+
+ memTextures += r.memTextures;
+ memIndexBuffers += r.memIndexBuffers;
+ memVertexBuffers += r.memVertexBuffers;
+ return *this;
+}
+
} // namespace gfx
} // namespace mbgl \ No newline at end of file