| 84 | } |
| 85 | |
| 86 | ObjectsStats ObjectManager::stats() const { |
| 87 | ObjectsStats stats; |
| 88 | for (auto& texture : textures_) { |
| 89 | if (!texture || !texture->has_ownership()) continue; |
| 90 | stats.textures.count++; |
| 91 | stats.textures.total_bytes += texture->bytes_size(); |
| 92 | } |
| 93 | for (auto& buffer : buffers_) { |
| 94 | if (!buffer || !buffer->has_ownership()) continue; |
| 95 | stats.buffers.count++; |
| 96 | stats.buffers.total_bytes += buffer->bytes_size(); |
| 97 | } |
| 98 | return stats; |
| 99 | } |
| 100 | |
| 101 | } // namespace gl |
| 102 | } // namespace gpu |
nothing calls this directly
no test coverage detected