summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGfx/PortableImageLoaderCommon.h
AgeCommit message (Collapse)Author
2022-03-13LibGfx: Commonize P[BGP]M file loading contextsLenny Maiorani
Much of the code in PBM, PGM, and PPM image loaders is common. The contexts are nearly identical. Instead of writing multiple contexts, write 1 with a template argument to pass in the details of the given format.
2021-11-11LibGfx: Remove load_FORMAT() image codec wrappersAndreas Kling
We had a bunch of old unused wrapper functions for each image codec that would load a supported image with a given path. Nobody actually used them, so let's just get rid of load_png(), load_gif(), etc.
2021-11-11Everywhere: Pass AK::StringView by valueAndreas Kling
2021-11-08LibGfx: Use ErrorOr<T> for Bitmap::try_create()Andreas Kling
Another one that was used in a fajillion places.
2021-09-09LibGfx: Move common loader functionality to load from memory functionsTimothy
This will share functionality between the load from path and load from memory functions.
2021-07-25LibGfx: Remove "purgeable Gfx::Bitmap" as a separate conceptAndreas Kling
This was a really weird thing to begin with, purgeable bitmaps were basically regular bitmaps without a physical memory reservation. Since all the clients of this code ended up populating the bitmaps with pixels immediately after allocating them anyway, there was no need to avoid the reservation. Instead, all Gfx::Bitmaps are now purgeable, in the sense that they can be marked as volatile or non-volatile. The only difference here is that allocation failure is surfaced when we try to create the bitmap instead of during the handling of a subsequent page fault.
2021-07-21LibGfx: Use "try_" prefix for static factory functionsAndreas Kling
Also mark them as [[nodiscard]].
2021-05-09LibGfx: Change "white_space" => "whitespace"Andreas Kling
Whitespace is one word. :^)
2021-04-29Everywhere: Use "the SerenityOS developers." in copyright headersLinus Groh
We had some inconsistencies before: - Sometimes "The", sometimes "the" - Sometimes trailing ".", sometimes no trailing "." I picked the most common one (lowecase "the", trailing ".") and applied it to all copyright headers. By using the exact same string everywhere we can ensure nothing gets missed during a global search (and replace), and that these inconsistencies are not spread any further (as copyright headers are commonly copied to new files).
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-03-16LibGfx: Rename 32-bit BitmapFormats to BGRA8888 and BGRx888xAndreas Kling
The previous names (RGBA32 and RGB32) were misleading since that's not the actual byte order in memory. The new names reflect exactly how the color values get laid out in bitmap data.
2021-02-26Everywhere: Remove a bunch of redundant 'AK::' namespace prefixesLinus Groh
This is basically just for consistency, it's quite strange to see multiple AK container types next to each other, some with and some without the namespace prefix - we're 'using AK::Foo;' a lot and should leverage that. :^)
2021-02-08Everywhere: Replace dbgln<flag>(...) with dbgln_if(flag, ...)AnotherTest
Replacement made by `find Kernel Userland -name '*.h' -o -name '*.cpp' | sed -i -Ee 's/dbgln\b<(\w+)>\(/dbgln_if(\1, /g'`
2021-01-25Everywhere: Debug macros instead of constexpr.asynts
This was done with the following script: find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/dbgln<debug_([a-z_]+)>/dbgln<\U\1_DEBUG>/' {} \; find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/if constexpr \(debug_([a-z0-9_]+)/if constexpr \(\U\1_DEBUG/' {} \;
2021-01-22Everywhere: Replace a bundle of dbg with dbgln.asynts
These changes are arbitrarily divided into multiple commits to make it easier to find potentially introduced bugs with git bisect.
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling