Repository navigation
fix(transparency): meter the picture box of an uncropped slide on the CPU - #1589
Merged
marcinz606 merged 3 commits intoNov 1, 2026
Merged
Conversation
… CPU TransparencyBaseProcessor ignored process.meter_rect, which the GPU engine and the print path honour. On a slide in a holder the CPU metered the whole frame and the GPU only the picture box, so Cast Removal's neutral axis and Auto Density/Grade's meters differed between engines. On 106-21 with marcinz606#1581 the CPU mid ref was (-1.032, -1.073, -1.004), the GPU (-0.670, -0.904, -1.107); both now read the GPU's. Scan clip fractions read the same region. ShaderLoader kept modules compiled on a device that destroy_singleton had released, so any GPUEngine built after controller.cleanup() failed to compile its pipelines. The cache now empties when the device changes.
…eck clipping The ShaderLoader device fix moves to fix/shader-loader-new-device. The test fixture adds clipped red outside the picture box and clipped blue inside it, so the clip-fraction checks fail without the fix: the CPU now reads them from the metering region, a freehand Analysis Rect included, as the GPU and the print path do. With clipped pixels outside an Analysis Rect the CPU read (0.043, 0.037, 0.037), the GPU (0.040, 0, 0). The red-over-blue midtone check passed without the fix and goes.
The ShaderLoader fix stays in this PR: in the full suite an earlier test
calls destroy_singleton, and without it the new GPU meter test gets a
module from the released device ("Device of ShaderModule doesn't match
Device"). The cache now empties when the device changes. The app builds
no engine after cleanup, so only tests that tear the device down see it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On a slide in a holder, the CPU metered the whole frame, while the GPU and the print path metered only the picture box (
meter_rect). So Cast Removal's neutral axis, Auto Density and Auto Grade gave different results on the two engines. On one NORAD slide the CPU midtone was (-1.032, -1.073, -1.004) and the GPU's (-0.670, -0.904, -1.107). Thumbnails and the contact sheet render on the CPU, so they did not match the preview. Scan clip fractions also ignored a freehand Analysis Rect on the CPU.The slide path now reads the same region as the GPU, and
THUMBNAIL_RENDER_VERSIONgoes to 30. The PR also lets ShaderLoader recompile when the GPU device changes. Without this, the new GPU test gets a shader from a released device in the full suite. In the app this only matters after shutdown.