summaryrefslogtreecommitdiff
path: root/src/mbgl/gl/texture_resource.hpp
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/gl/texture_resource.hpp
parentc8576e089f12438a2384a4fe822af650e94ace74 (diff)
downloadqtlocation-mapboxgl-fb062bb23e66af3d5a889b767aae380884b259e5.tar.gz
[render-test] Add resource usage tracking to gfx context
Diffstat (limited to 'src/mbgl/gl/texture_resource.hpp')
-rw-r--r--src/mbgl/gl/texture_resource.hpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mbgl/gl/texture_resource.hpp b/src/mbgl/gl/texture_resource.hpp
index ed742e75b7..494e5ae8a3 100644
--- a/src/mbgl/gl/texture_resource.hpp
+++ b/src/mbgl/gl/texture_resource.hpp
@@ -8,14 +8,17 @@ namespace gl {
class TextureResource : public gfx::TextureResource {
public:
- TextureResource(UniqueTexture&& texture_) : texture(std::move(texture_)) {
- }
+ TextureResource(UniqueTexture&& texture_, int byteSize_) : texture(std::move(texture_)), byteSize(byteSize_) {}
+ ~TextureResource();
+
+ static int getStorageSize(const Size& size, gfx::TexturePixelType format, gfx::TextureChannelDataType type);
UniqueTexture texture;
gfx::TextureFilterType filter = gfx::TextureFilterType::Nearest;
gfx::TextureMipMapType mipmap = gfx::TextureMipMapType::No;
gfx::TextureWrapType wrapX = gfx::TextureWrapType::Clamp;
gfx::TextureWrapType wrapY = gfx::TextureWrapType::Clamp;
+ int byteSize;
};
} // namespace gl