Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3353 +/- ##
=========================================
Coverage ? 90.77%
=========================================
Files ? 85
Lines ? 10475
Branches ? 1163
=========================================
Hits ? 9509
Misses ? 707
Partials ? 259 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.



Issues Fixed
Fixes #3351
Description
Adds an opt-out crossfade transition when the viewer rotates from one
image asset to the next (static image or animated GIF). Previously
this was an instant swap; now the outgoing frame fades out while the
incoming one fades in. :)
Scope is strictly image → image:
still cuts instantly, since those paths already blank the current
image before handing back to the image loader.
actual asset change does.
since there's nothing to fade from.
Implementation:
image_transition.h/.cpp(new) holds the pure, unit-testable logic:parsing/clamping
ANTHIAS_IMAGE_TRANSITION_MS(default 300 ms,clamped to 0–5000 ms; 0 disables it), the predicate that decides
whether a fade should start, and the progress-from-elapsed-time
math. This follows the same shape as the existing
image_fallback.cpp/rotation.cpp. No QtWebEngine dependency,so it's covered by
tests/test_image_transition.cpp(13 cases, allpassing) without pulling in the heavier Qt modules.
Viewgained the state needed to run the transition(
fadeFromImage, a 60fpsfadeTimerthat only runs while a fade isactive,
fadeElapsed,fadeDurationMs,fadeActive) plusstartImageFade()/stopImageFade().loadAsStaticImage()andsetupAnimation()capture the outgoingframe right before it's overwritten and arm the fade. If a new
image arrives mid-fade, this same capture re-seeds the fade from
whatever is actually on screen at that instant instead of stacking
two transitions.
(
playVideo(), the"null"video-onset sentinel inloadImage(),loadPage()) now also cancel any in-progress fade.paintEvent()draws the outgoing and incoming frames through theexact same scale/centre math as before (factored into a small
drawScaledImage()helper called twice instead of once), includingon the linuxfb manual-rotation path, so both frames of a
cross-fading pair are rotated identically rather than blended
before rotation.
Not touched: asset scheduling/duration semantics (the fade happens
inside the existing display window), and the video/web-page paths
themselves.
Checklist