koreader / koreader-base

Base framework offering a Lua scriptable environment for creating document readers
http://koreader.rocks/
GNU Affero General Public License v3.0
130 stars 105 forks source link

MuPDF: Unbreak RGB->BGR swap #1808

Closed NiLuJe closed 3 months ago

NiLuJe commented 3 months ago

fz_default_color_params is no longer a function, but a plain constant.

Regression since #1805

Re: https://github.com/koreader/koreader/issues/11952


This change is Reviewable

NiLuJe commented 3 months ago

(Untested, mind you ^^).

jospalau commented 3 months ago

Commenting the line self.hasBGRFrameBuffer = yes in device.lua for Kobo makes it work. Thanks

NiLuJe commented 3 months ago

Another random query, as I'm unfamiliar with the whole thing: fz_convert_pixmap can throw, should it be wrapped in one our our wrap-mupdf.h wrappers?

NiLuJe commented 3 months ago

Eh, wrapped it.

Also, tested it now ;p.

Which means I had my first new buildsystem experience: she goes!

- Real: 64.51s User: 551.75s System: 87.05s Percent: 990% Cmd: ./kodev build MajFault: 867 VolContSw: 265299 InvContSw: 176338

(Add ~10s for a clean clone, this was a rebuild so the sources were downloaded already).

(And there's still potentially a lot of headroom for more //, as it's a 32 threads machine, so that 990% could theoretically go as high as 3200%. Emphasis on "theoretically": I run Gentoo, so I'm aware that you'd have to push pretty hard to saturate it, unless you're building something gigantic ;)).

Kudos @benoit-pierre ;).