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

Adapt to recent foundation::Tile class changes #284

Merged
merged 1 commit into from
Apr 17, 2019

Conversation

usakhelo
Copy link
Contributor

Couple of changes required to compile against current appleseed master branch

@usakhelo usakhelo mentioned this pull request Apr 17, 2019
Copy link
Member

@dictoon dictoon left a comment

Choose a reason for hiding this comment

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

Looks good.

As I was reviewing this code I noticed that we can also remove a bunch of code a few lines above your changes. Because appleseed's frame is now always using 32-bit floating point channels, all of this code in TileCallback::blit_tile() can be removed and tile can be used directly:

// Allocate memory for the temporary tile.
if (m_float_tile_storage.get() == nullptr)
{
    m_float_tile_storage.reset(
        new asf::Tile(
            props.m_tile_width,
            props.m_tile_height,
            props.m_channel_count,
            asf::PixelFormatFloat));
}

// Retrieve the source tile.
const asf::Tile& tile = frame.image().tile(tile_x, tile_y);

// Convert the tile to 32-bit floating point.
asf::Tile fp_tile(
    tile,
    asf::PixelFormatFloat,
    m_float_tile_storage->get_storage());

@dictoon dictoon merged commit 2637f08 into appleseedhq:master Apr 17, 2019
@usakhelo usakhelo deleted the tile_changes branch October 14, 2019 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants