class
ActiveStorage::VariantProcessor::VipsProcessorAccessTest
- ActiveStorage::VariantProcessor::VipsProcessorAccessTest
- Minitest::Test
- Minitest::Runnable
- Reference
- Object
Overview
The access mode the source is loaded under is an argument to libvips about read order, and the only thing it may change is the memory libvips peaks at. A variant is stored under the digest of its variation and nothing recomputes it afterwards, so a mode that moved the encoded bytes would be served for the lifetime of the record without anything noticing. :nodoc:
Defined in:
active_storage/variant_processor/vips_processor_test.crInstance Method Summary
-
#test_a_blank_rotate_leaves_the_source_loaded_sequentially
The same blank argument that keeps a transformation from running keeps it from deciding the access mode, or a
rotatenothing rotates with would cost every variation the hint. -
#test_a_variation_that_rotates_the_source_is_processed
rotatereads the source bottom-up or off its axis, which a sequential load cannot serve. -
#test_no_operation_encodes_different_bytes_under_the_access_mode_it_is_loaded_with
The reference is this same processor reading the source the old way, rather than a digest written into the test, because a written digest pins the libvips encoder along with it and this has to hold on whichever libvips the shard is built against.
Instance Method Detail
The same blank argument that keeps a transformation from running keeps it from deciding the
access mode, or a rotate nothing rotates with would cost every variation the hint.
rotate reads the source bottom-up or off its axis, which a sequential load cannot serve.
libvips answers that by aborting the load, not by re-ordering its reads, so these variations
raise rather than return an image when the source is loaded sequentially for them too. Each one
here reproduced that on libvips 8.18.7.
The reference is this same processor reading the source the old way, rather than a digest written into the test, because a written digest pins the libvips encoder along with it and this has to hold on whichever libvips the shard is built against.