-
Notifications
You must be signed in to change notification settings - Fork 105
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
Handle CRe's weird-ass pixel-format once and for all #1265
Conversation
Too many codepaths inside CRe
This reverts commit 67a00c5.
invert here But we don't gain much, if anything. The performance hit isn't so much in *what* we do in the extra buffer walk, it's in the act of walking the buffer in itself :/
Now, while this is only actually an issue visible in native buffer grabs on RGB32, there are a couple of quirks to take into account:
So, this leaves handling it right after CRe's done with a buffer for a specific page, in C(++). (FWIW, this is what the CRe Android GUI does, too). |
Oh, and as the actual performance hit is the buffer walk in itself, not so much what we do inside, I moved the full conversion in there, to get rid of the various potential quirks of the in-CRe BGR swap. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine by me.
Looks indeed like a long walk... But I trust you it's for the best. I guess at one point, you'll try optimizing it by using parallel same operation on multiple byte, the neon stuff, if I got that right :) |
Yeah, that's only the color codepath (so, yeah, essentially Android & SDL). And that's indeed something that could potentially be vectorized, but again, the issue isn't so much the cost of the operation being done, but the simple fact that we're churning over the buffer again. But still, probably some potential for improvements if someone were to take an interest in it ;). |
* Bump android-luajit-launcher koreader/android-luajit-launcher#279 * Bump base koreader/koreader-base#1265 koreader/koreader-base#1267 koreader/koreader-base#1268
* Convert CRe's insane pixel format post-blit Too many codepaths inside CRe * Bump CRe koreader/crengine#402
We expect RGBA, CRe uses BGRX (well, alpha is actually sane, but inverted. Which, AFAIK, is usually a weird legacy PNG/Gif quirk or something, but, oh, well).
As discussed in koreader/koreader#7021
Depends on koreader/crengine#402
This change is