void CoordinatedGraphicsScene::syncImageBackings(const CoordinatedGraphicsState& state)
{
    for (size_t i = 0; i < state.imagesToRemove.size(); ++i)
        removeImageBacking(state.imagesToRemove[i]);

    for (size_t i = 0; i < state.imagesToCreate.size(); ++i)
        createImageBacking(state.imagesToCreate[i]);

    for (size_t i = 0; i < state.imagesToUpdate.size(); ++i)
        updateImageBacking(state.imagesToUpdate[i].first, state.imagesToUpdate[i].second);

    for (size_t i = 0; i < state.imagesToClear.size(); ++i)
        clearImageBackingContents(state.imagesToClear[i]);
}
void CoordinatedGraphicsScene::syncImageBackings(const CoordinatedGraphicsState& state)
{
    for (auto& image : state.imagesToRemove)
        removeImageBacking(image);

    for (auto& image : state.imagesToCreate)
        createImageBacking(image);

    for (auto& image : state.imagesToUpdate)
        updateImageBacking(image.first, image.second);

    for (auto& image : state.imagesToClear)
        clearImageBackingContents(image);
}