-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Skim dialog - possible minor flash_ui issue #7326
Comments
see #7262 (comment) and #7325 |
I'm going to need more details, because I can't reproduce anything like this (even on a PW2), and nearly everything is fenced in that widget, so if there's one place were races won't happen, it's there ;). |
I can reproduce some weirdness in the progress bar (the document bleeds through) when the skimto is in transparent mode |
And the button which was pressed last bleeds through to the document also |
ie: part of the widget loses transparency and part does not leading to inconsistencies. |
Oh, that's just ghosting. Nothing much we can do about that. @yparitcher: I don't think I can reproduce any of that, everything stays transparent as it ought to. That might not have been the case before, but that was a bug ;). Stuff may be slightly flickery during the button's unhighlight refresh, but it should settle when it's done. |
@hius07: On the upside, we can somewhat side-step the issue because we have a lot of other box-drawing characters at our disposal. And, in fact, the Search widget was already doing just that to get a thicker pipe, so I did the same thing here ;). |
It's more amenable to ghosting, and it matches what we use in ReaderSearch. Fix koreader#7326
holding on the skimto will then go to nontransparent (it still thinks it is transparent) |
Huh. I definitely can't reproduce that ;). Is that on a PW2, too? |
PW4 edit: you have to set it transparent by holding first |
That's... weird. You don't happen to have anything custom that might squat a weird spot in the window stack on that device? With debug logging enabled, you should see something along the lines of
(that's the unhighlight's widgetRepaint, followed by its setDirty on its parent, which UIManager groks as translucent, causing ReaderUI to be repainted). |
With more context, starting from a translucent SkimTo, a tap on Next chapter does:
|
edit: verbose logs
|
I have custom plugins, but none that are displaying anything in the window stack |
That looks sane, weird. If you disable flash_ui, does the SkimTo widget loses its transparency or something similarly broken when you do the same thing? |
Yes, not related to flash_ui, the transparency comes and goes if i press the buttons many times |
That feels like it's the REAGL algo being confused as to which pixels were actually changed or not. (That would also explain why I can't reproduce it anywhere else). If you force GC16 for partials, does it help (not viable, obviously, just curious ;p)? diff --git a/ffi/framebuffer_mxcfb.lua b/ffi/framebuffer_mxcfb.lua
index fa821ca7..0d4a3891 100644
--- a/ffi/framebuffer_mxcfb.lua
+++ b/ffi/framebuffer_mxcfb.lua
@@ -724,7 +724,7 @@ function framebuffer:init()
-- Zelda explicitly requests GC16 when flashing an UI element that doesn't cover the full screen...
-- And it resorts to AUTO when PARTIAL, because GC16_FAST is no more (it points to GC16).
self.waveform_flashui = C.WAVEFORM_MODE_GC16
- self.waveform_reagl = C.WAVEFORM_MODE_ZELDA_GLR16
+ self.waveform_reagl = C.WAVEFORM_MODE_GC16
self.waveform_partial = self.waveform_reagl
-- NOTE: Because we can't have nice things, we have to account for devices that do not actuallly support the fancy inverted waveforms...
if isNightModeChallenged then (Or, I guess, on a PW4, enabling nightmode would also swap to the NM waveforms, which might handle that differently, too). |
NM is broken, i will get back to you in an hour or 2 about GC16 |
FWIW, I can spam-click all day without breaking the transparency ;). (Until the moment my finger slips and triggers a hold, that is ;p). |
* flash_ui: Yield to the kernel between the HL and the UNHL/CB to let the EPDC do its thing in peace. * UIManager: Handle nils in task scheduling arguments. * SkimTo: Use the same, thicker chapter nav icons as ReaderSearch (fix #7326). * SkimTo: The bookmark toggle button doesn't require a vsync flag.
Forcing GC16 does fix the issue. |
@yparitcher: Huh. Thanks for confirming my hunch. It's still...super weird, though. On which FW version is that (I mean, there's a vague chance it might have been fixed at one point, but Kindle, FW updates, nasty, etc, etc, so it's mostly for posterity's sake ^^)? |
As another stupid experiment, you can try REAGLD, because it should handle mixed content better. diff --git a/ffi/framebuffer_mxcfb.lua b/ffi/framebuffer_mxcfb.lua
index fa821ca7..38b75bfb 100644
--- a/ffi/framebuffer_mxcfb.lua
+++ b/ffi/framebuffer_mxcfb.lua
@@ -452,7 +452,7 @@ end
local function refresh_rex(fb, refreshtype, waveform_mode, x, y, w, h, dither)
local refarea = ffi.new("struct mxcfb_update_data_rex[1]")
-- only for Amazon's driver, try to mostly follow what the stock reader does...
- if waveform_mode == C.WAVEFORM_MODE_ZELDA_GLR16 then
+ if waveform_mode == C.WAVEFORM_MODE_ZELDA_GLR16 or waveform_mode == C.WAVEFORM_MODE_ZELDA_GLD16 then
-- If we're requesting WAVEFORM_MODE_ZELDA_GLR16, it's REAGL all around!
refarea[0].hist_bw_waveform_mode = waveform_mode
refarea[0].hist_gray_waveform_mode = waveform_mode
@@ -474,8 +474,11 @@ local function refresh_rex(fb, refreshtype, waveform_mode, x, y, w, h, dither)
refarea[0].dither_mode = C.EPDC_FLAG_USE_DITHERING_PASSTHROUGH
refarea[0].quant_bit = 0;
end
+ -- REAGLD
+ if waveform_mode == C.WAVEFORM_MODE_ZELDA_GLD16 then
+ refarea[0].flags = C.EPDC_FLAG_USE_ZELDA_REGAL
-- Enable the appropriate flag when requesting a 2bit update, provided we're not dithering.
- if waveform_mode == C.WAVEFORM_MODE_A2 and not dither then
+ elseif waveform_mode == C.WAVEFORM_MODE_A2 and not dither then
refarea[0].flags = C.EPDC_FLAG_FORCE_MONOCHROME
else
refarea[0].flags = 0
@@ -724,7 +727,7 @@ function framebuffer:init()
-- Zelda explicitly requests GC16 when flashing an UI element that doesn't cover the full screen...
-- And it resorts to AUTO when PARTIAL, because GC16_FAST is no more (it points to GC16).
self.waveform_flashui = C.WAVEFORM_MODE_GC16
- self.waveform_reagl = C.WAVEFORM_MODE_ZELDA_GLR16
+ self.waveform_reagl = C.WAVEFORM_MODE_ZELDA_GLD16
self.waveform_partial = self.waveform_reagl
-- NOTE: Because we can't have nice things, we have to account for devices that do not actuallly support the fancy inverted waveforms...
if isNightModeChallenged then Not necessarily a great solution easier, because it's barely any better than GC16 in practice, and I've never actually seen anything using it successfully (I mean, the Kobo Aura did, and it was... not great ^^). |
5.10.1.3 I will dust off my KT4 and update its koreader to confirm. it is on 5.11.1 |
On the upside, I can't think of anything else off the top of my head ;). |
correct. non issue |
but when launching the margin dialog by clicking on the more button from the bottom menu, the thin grey lines around the close & apply buttons are not drawn edit: if i then make it transparent they appear, and they stay even if i make it opaque again |
By "not drawn", do you mean they're invisible (and you essentially see a thin line of whatever text is behind peeking through the widget), or that they're drawn in white? |
I think white |
using koreader-kindlepw2-v2021.02-34-g37af0fd6_2021-02-23 when turning pages the letters are fuzzy (aliased) unless i refresh the page with a diagonal swipe |
-- Enable the appropriate flag when requesting a 2bit update, provided we're not dithering.
if waveform_mode == C.WAVEFORM_MODE_A2 and not dither then
refarea[0].flags = C.EPDC_FLAG_FORCE_MONOCHROME back to DU instead of A2 to enforce monochrome fixes the fuzzy letters |
Err, turning pages where? This shouldn't affect anything besides essentially menus/buttons during a highlight. |
reading epubs |
That... doesn't make sense ^^. |
with a diagonal flash being 10 for clarity with |
Still doesn't make sense: ReaderUI never refreshes a page with anything else than partial/full. A2/DU never enters the equation o_O. |
If that's a MenuItem or a Button, sure, but you should never hit FORCE_MONOCHROME anywhere near actual ReaderUI content :? |
How do i disable the footer to test if it is that? |
Err, which footer are we talking about? |
regular bottom status bar. It doesn't want to go away |
Gah, wait, I know. 🤦 Notice the fix I sneaked in koreader/koreader-base#1314 where C.WAVEFORM_MODE_A2 became C.WAVEFORM_MODE_ZELDA_A2? That was a very stupid bug, with an extremely harmful effect, because the old A2 constant maps to... Which explains why it was thoroughly screwing over ReaderUI ^^. |
As for the footer, unless you have the lock enabled, a tap should cycle it until it finally disappears ;). |
I had lock :) and its not the footer |
Also, you know what: that's probably what broke REAGL in the first place, too. >_<". (The only reason I had a quick suggestion at the ready with your original screenshot is because it looked very much like the FORCE_MONOCHROME issues on Kobo Mk. 7 ;)). |
The TL;DR being: I have a strong suspicion that koreader/koreader-base#1314 will fix the transparency issue, too ^^. |
I will test. |
Sure, I finally did a proper writeup of that in FBInk last month ;). |
koreader/koreader-base#1314 fixes the issues :) |
how do partial and full intersect with this all? |
FULL essentially requests a flash on waveform modes that support it (in practice, mostly the G* ones do). (That's what the "will never flash" mentions refer to). Things get a bit more fancy where REAGL is concerned:
|
As in, you can ask for A2, FULL all you want, that'll never change its actual behavior ;). Special mention for GC16, where FULL, in addition to the flash, also enforces an update for every pixel in the region, while a PARTIAL GC16 won't do anything for unchanged pixels. |
At first, the new Skim dialog without the header and with the star button looks and works great.
Issue
After pressing Next (or Previous) chapter button part of it (vertical line) becomes greyed.
I made a screenshot but the issue is not visible: on the screenshot the full button is black.
The text was updated successfully, but these errors were encountered: