Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api: remove redundant ImageSpec from ImageCache (issue #4436) #4442

Merged
merged 9 commits into from
Sep 28, 2024

Conversation

bfraboni
Copy link
Contributor

@bfraboni bfraboni commented Sep 25, 2024

Description

First draft of frontend changes for issue #4436.

Checklist:

  • change imagespec, get_imagespec API calls in ImageCache, ImageCacheImpl, TextureSystem and all calls.
  • add get_cache_dimensions to access cache internal mip level dimensions
  • add get_cache_dimensions unit tests once we validate the new version
  • change backend to reduce memory usage (might be a different PR)

@lgritz lgritz added texture / image cache ImageCache, TextureSystem, maketx help wanted A task that is desired, but needs somebody to commit the effort to implement it. Dev Days ASWF Dev Days suitable project devdays24 Dev Days 2024 labels Sep 25, 2024
@lgritz
Copy link
Collaborator

lgritz commented Sep 25, 2024

Other than the comment I made about elaborating the description a bit, this is all looking great to me.

We talked in a different channel about adding back some very minimal inline methods to keep back compatibility for now, so I know that's still on its way, but if that ends up straightforward, we should be able to merge this without any trouble. Then the API will be nailed down and you can do the further changes to the internals without any additional compatibility breaks during our upcoming beta period.

@bfraboni
Copy link
Contributor Author

bfraboni commented Sep 25, 2024

I've added the backwards compatible methods for ImageCache get_imagespec() and imagespec(), and TextureSystem get_imagespec(). I think the CI is happy now, I just need to write unit tests for the newer get_cache_dimensions() method and it'll be good to go.
Thank you @lgritz for the directions !

@bfraboni bfraboni changed the title [MEMORY] Remove redundant ImageSpec from ImageCache (issue #4436) api: remove redundant ImageSpec from ImageCache (issue #4436) Sep 25, 2024
@jmertic jmertic linked an issue Sep 26, 2024 that may be closed by this pull request
@bfraboni
Copy link
Contributor Author

bfraboni commented Sep 27, 2024

I've just rebased the PR and added the unit tests for get_cache_dimensions()

Signed-off-by: Basile Fraboni <[email protected]>
Copy link
Collaborator

@lgritz lgritz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

I suggested two changes to docs -- just inserting a blank line to be sure it understands the parameter command. I will add those for you by simply accepting the suggestions, then merge.

Thanks, this is great. Looking forward to the eventual change to the internal implementation, but this at least gets the new API locked into place.

src/include/OpenImageIO/imagecache.h Show resolved Hide resolved
src/include/OpenImageIO/imagecache.h Show resolved Hide resolved
Slight fix to comment formatting

Signed-off-by: Larry Gritz <[email protected]>
Slight fix to comment formatting

Signed-off-by: Larry Gritz <[email protected]>
@lgritz lgritz merged commit 14be11a into AcademySoftwareFoundation:main Sep 28, 2024
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dev Days ASWF Dev Days suitable project devdays24 Dev Days 2024 help wanted A task that is desired, but needs somebody to commit the effort to implement it. texture / image cache ImageCache, TextureSystem, maketx
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[MEMORY] Reduce file descriptors memory footprint in the ImageCache
2 participants