Make tess compile again Diffs= 53972cc17 Make tess compile again (#6308) Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
diff --git a/.rive_head b/.rive_head index 1be5c7b..467da65 100644 --- a/.rive_head +++ b/.rive_head
@@ -1 +1 @@ -fabb7f97fe7b69368c9a7369febfecbc90be49cd +53972cc17b532e83ffee7cae7d3420e95f822e8f
diff --git a/include/rive/file_asset_loader.hpp b/include/rive/file_asset_loader.hpp index 43bb2bf..0f18206 100644 --- a/include/rive/file_asset_loader.hpp +++ b/include/rive/file_asset_loader.hpp
@@ -7,6 +7,7 @@ namespace rive { +class Factory; class FileAsset; class FileAssetLoader {
diff --git a/viewer/include/viewer/sample_tools/sample_atlas_packer.hpp b/viewer/include/viewer/sample_tools/sample_atlas_packer.hpp index e9e3c09..be871db 100644 --- a/viewer/include/viewer/sample_tools/sample_atlas_packer.hpp +++ b/viewer/include/viewer/sample_tools/sample_atlas_packer.hpp
@@ -72,8 +72,8 @@ std::unordered_map<uint32_t, rive::rcp<rive::SokolRenderImageResource>> m_sharedImageResources; public: - SampleAtlasResolver(SampleAtlasPacker* packer); - void loadContents(FileAsset& asset) override; + SampleAtlasLoader(SampleAtlasPacker* packer); + bool loadContents(FileAsset& asset, Span<const uint8_t> inBandBytes, Factory*) override; }; } // namespace rive -#endif \ No newline at end of file +#endif
diff --git a/viewer/src/sample_tools/sample_atlas_packer.cpp b/viewer/src/sample_tools/sample_atlas_packer.cpp index 9b5d707..b250b34 100644 --- a/viewer/src/sample_tools/sample_atlas_packer.cpp +++ b/viewer/src/sample_tools/sample_atlas_packer.cpp
@@ -196,9 +196,9 @@ return false; } -SampleAtlasResolver::SampleAtlasResolver(SampleAtlasPacker* packer) : m_packer(packer) {} +SampleAtlasLoader::SampleAtlasLoader(SampleAtlasPacker* packer) : m_packer(packer) {} -void SampleAtlasResolver::loadContents(FileAsset& asset) +bool SampleAtlasLoader::loadContents(FileAsset& asset, Span<const uint8_t> inBandBytes, Factory*) { if (asset.is<ImageAsset>()) { @@ -234,11 +234,13 @@ // renderer (and hence will know which RenderImage they need to // make). - imageAsset->renderImage(rivestd::make_unique<SokolRenderImage>(imageResource, - location.width, - location.height, - location.transform)); + imageAsset->renderImage(make_rcp<SokolRenderImage>(imageResource, + location.width, + location.height, + location.transform)); + return true; } } + return false; } #endif
diff --git a/viewer/src/viewer_content/scene_content.cpp b/viewer/src/viewer_content/scene_content.cpp index 6e66604..392a666 100644 --- a/viewer/src/viewer_content/scene_content.cpp +++ b/viewer/src/viewer_content/scene_content.cpp
@@ -252,7 +252,7 @@ // our riv file with the images stripped out of it. rive::ImportResult loadAtlasedResult; - rive::SampleAtlasResolver resolver(&atlasPacker); + rive::SampleAtlasLoader resolver(&atlasPacker); if (auto file = rive::File::import(strippedBytes, RiveFactory(), &loadAtlasedResult,