diff options
author | Bartosz Taudul <wolf.pld@gmail.com> | 2020-03-02 04:08:14 +0300 |
---|---|---|
committer | Bartosz Taudul <wolf.pld@gmail.com> | 2020-03-02 04:08:14 +0300 |
commit | 50123298a78998a4575a1d3f3bd6a09048c2f8af (patch) | |
tree | 771d770dd7f271b1c2761c48b444b13b39abce09 /server/TracyTextureCompression.hpp | |
parent | aa0bf47ec3ea03c5e7c78263e1956af5ab018131 (diff) |
Unify texture compression implementations.
Diffstat (limited to 'server/TracyTextureCompression.hpp')
-rw-r--r-- | server/TracyTextureCompression.hpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/server/TracyTextureCompression.hpp b/server/TracyTextureCompression.hpp index 2dacfed4..5c5d8ebe 100644 --- a/server/TracyTextureCompression.hpp +++ b/server/TracyTextureCompression.hpp @@ -20,12 +20,12 @@ public: TextureCompression(); ~TextureCompression(); - void Pack( struct ZSTD_CCtx_s* ctx, char*& buf, size_t& bufsz, const char* image, uint32_t inBytes, uint32_t& csz ) const; + uint32_t Pack( struct ZSTD_CCtx_s* ctx, char*& buf, size_t& bufsz, const char* image, uint32_t inBytes ) const; template<size_t Size> const char* Pack( const char* image, uint32_t inBytes, uint32_t& csz, Slab<Size>& slab ) { - const auto outsz = PackImpl( image, inBytes ); + const auto outsz = Pack( m_cctx, m_buf, m_bufSize, image, inBytes ); auto ptr = (char*)slab.AllocBig( outsz ); memcpy( ptr, m_buf, outsz ); csz = outsz; @@ -35,8 +35,6 @@ public: const char* Unpack( const FrameImage& image ); private: - uint32_t PackImpl( const char* image, uint32_t inBytes ); - char* m_buf; size_t m_bufSize; struct ZSTD_CCtx_s* m_cctx; |