1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:28:12 +00:00
serenity/Userland/Libraries/LibGfx
MacDue 790daa4754 LibGfx: Optimize Painter::draw_scaled_bitmap_with_transform()
This now applies clipping to the destination bounding box before
painting, which cuts out a load of clipped computation and allows
using the faster set_physical_pixel() method.

Alongside this it also combines the source_transform and
inverse_transform outside the hot loop (which might cut things down
a little).

The `destination_quad.contains()` check is also removed in favour
of just checking if the mapped point is inside the source rect,
which takes less work to compute than checking the bounding box.

This takes this method down from 98% of the time to 10% of the
time when painting Google Street View (with no obvious issues).
2023-04-12 07:40:22 +02:00
..
Filters LibGfx: Remove try_ prefix from bitmap creation functions 2023-01-26 20:24:37 +00:00
Font Everywhere: Remove unused DeprecatedString includes 2023-04-09 22:00:54 +02:00
ICC LibGfx/ICC: Add evaluate() member functions to both curve types 2023-04-11 18:23:07 +02:00
ImageFormats Everywhere: Remove unused DeprecatedString includes 2023-04-09 22:00:54 +02:00
AffineTransform.cpp Meta+Userland: Pass Gfx::IntSize by value 2022-12-07 11:48:27 +01:00
AffineTransform.h Meta+Userland: Pass Gfx::IntSize by value 2022-12-07 11:48:27 +01:00
AntiAliasingPainter.cpp LibGfx: Make all fill_path() code member functions and move into .cpp 2023-03-11 18:34:26 +00:00
AntiAliasingPainter.h LibGfx+LibWeb: Store radii as FloatSize rather than FloatPoint 2023-02-10 23:33:16 +01:00
Bitmap.cpp LibGfx: Move all image loaders and writers to a subdirectory 2023-03-21 22:39:25 +01:00
Bitmap.h LibGfx: Add Bitmap::begin() / Bitmap::end() 2023-04-05 13:24:00 +02:00
BitmapMixer.cpp LibGfx: Add BitmapMixer 2022-01-04 21:41:14 +02:00
BitmapMixer.h LibGfx: Add BitmapMixer 2022-01-04 21:41:14 +02:00
CharacterBitmap.h Libraries: Make CharacterBitmap instances at compile-time 2022-03-04 17:41:08 +01:00
ClassicStylePainter.cpp LibGfx: Draw checkbox check in the center of the checkbox rect 2023-03-03 15:38:59 +01:00
ClassicStylePainter.h LibGUI+LibGfx: Let Desktop::the() set widget effects 2022-08-09 12:08:21 +02:00
ClassicWindowTheme.cpp Userland: Use Font::pixel_size_rounded_up() in more places 2023-03-04 00:29:38 +01:00
ClassicWindowTheme.h LibGfx: Make ClassicWindowTheme menubar heights respect the font size 2023-01-03 15:25:02 +01:00
CMakeLists.txt LibGfx: Move all image loaders and writers to a subdirectory 2023-03-21 22:39:25 +01:00
Color.cpp LibGfx: Use StringView literals for CSS color list 2023-03-12 12:46:24 +00:00
Color.h LibGfx: Add ALWAYS_INLINE to Color::mixed_with()/interpolate() 2023-02-18 17:10:04 +01:00
CursorParams.cpp Meta+Userland: Pass Gfx::IntPoint by value 2022-12-07 11:48:27 +01:00
CursorParams.h Meta+Userland: Pass Gfx::IntPoint by value 2022-12-07 11:48:27 +01:00
DisjointRectSet.h LibGfx+Everywhere: Make DisjointRectSet work for non-int Rects 2022-10-27 13:06:33 +02:00
FillPathImplementation.cpp LibGfx: Floor draw origin in fill path implementation 2023-04-09 18:42:45 +02:00
Forward.h LibGfx: Add paint styles and allow gradients to be used as them 2023-01-22 18:15:52 +01:00
Gamma.h LibGfx: Remove a workaround for clang before 11 2022-10-04 23:35:07 +01:00
GradientPainting.cpp Everywhere: Use ReadonlySpan<T> instead of Span<T const> 2023-02-08 19:15:45 +00:00
Gradients.h LibWeb+LibGfx: Migrate (most of) the CSS gradient painting to LibGfx 2023-01-10 10:25:58 +01:00
GrayscaleBitmap.h LibGfx: Add a simple GrayscaleBitmap class 2023-03-23 08:27:51 +00:00
Line.h LibGfx: Add small convenience functions for Lines and AA Painter 2023-01-26 10:37:26 +00:00
Matrix.h LibGfx: Add method to Matrix that determines if the matrix is invertible 2023-02-27 20:55:09 +01:00
Matrix3x3.h LibGfx: Add Matrix3x3 2021-12-30 14:24:29 +01:00
Matrix4x4.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Orientation.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Painter.cpp LibGfx: Optimize Painter::draw_scaled_bitmap_with_transform() 2023-04-12 07:40:22 +02:00
Painter.h LibGfx: Implement simple signed distance field rendering 2023-03-23 08:27:51 +00:00
PaintStyle.h LibGfx: Add BitmapPaintStyle 2023-04-09 18:42:45 +02:00
Palette.cpp LibGfx: Make the Palette constructor take NNRP<PaletteImpl> 2023-03-15 23:29:00 +01:00
Palette.h LibGfx: Make the Palette constructor take NNRP<PaletteImpl> 2023-03-15 23:29:00 +01:00
Path.cpp LibGfx: Fix crash due to vector resize in close_all_subpaths() 2023-04-09 18:42:45 +02:00
Path.h Everywhere: Remove NonnullRefPtr.h includes 2023-03-06 23:46:35 +01:00
Point.cpp LibIPC+Everywhere: Change IPC::encode's return type to ErrorOr 2023-01-04 11:49:15 +01:00
Point.h LibGfx: Add Point::to_floored<T>() 2023-04-09 18:42:45 +02:00
Quad.h LibGfx: Add Gfx::Quad<T> to represent arbitrary quadrilaterals 2022-04-07 17:06:02 +02:00
Rect.cpp LibIPC+Everywhere: Change IPC::encode's return type to ErrorOr 2023-01-04 11:49:15 +01:00
Rect.h LibGfx: Make Rect::align_within() correct for TopCenter and BottomCenter 2023-01-09 19:54:26 +01:00
ShareableBitmap.cpp LibGfx: Remove try_ prefix from bitmap creation functions 2023-01-26 20:24:37 +00:00
ShareableBitmap.h LibIPC+Everywhere: Change IPC::encode's return type to ErrorOr 2023-01-04 11:49:15 +01:00
Size.cpp LibIPC+Everywhere: Change IPC::encode's return type to ErrorOr 2023-01-04 11:49:15 +01:00
Size.h LibIPC+Everywhere: Change IPC::encode's return type to ErrorOr 2023-01-04 11:49:15 +01:00
StandardCursor.h Base+WindowServer+LibGfx: Add new DragCopy Cursor 2022-08-31 17:29:44 +01:00
StylePainter.cpp LibGUI+LibGfx: Let Desktop::the() set widget effects 2022-08-09 12:08:21 +02:00
StylePainter.h LibGUI+LibGfx: Let Desktop::the() set widget effects 2022-08-09 12:08:21 +02:00
SystemTheme.cpp Everywhere: Support overriding the system color scheme 2023-03-10 22:03:49 +01:00
SystemTheme.h Everywhere: Support overriding the system color scheme 2023-03-10 22:03:49 +01:00
TextAlignment.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
TextAttributes.h LibGfx+Userland: Make TextAttributes::underline_style optional 2023-03-15 14:55:49 +01:00
TextDirection.cpp Everywhere: Fix a bunch of typos 2021-05-17 17:48:55 +01:00
TextDirection.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
TextElision.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
TextLayout.cpp LibGfx: Consider multi-code point glyphs when computing text width 2023-02-22 10:14:36 +01:00
TextLayout.h LibGfx: Make text painting better at aligning vector fonts vertically 2023-01-06 12:02:21 +01:00
TextWrapping.h Userland: Move text wrapping/elision into the new TextLayout :^) 2021-07-26 21:14:39 +04:30
Triangle.cpp Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
Triangle.h Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
Vector2.h Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
Vector3.h Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
Vector4.h Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
VectorN.h LibGfx: Remove unnecessary AK:: prefix in VectorN.h 2023-03-06 13:05:43 +00:00
WindowTheme.cpp Libraries: Use default constructors/destructors in LibGfx 2022-03-17 17:23:49 +00:00
WindowTheme.h LibGfx+LibGUI+WindowServer+Apps+Demos: Replace ToolWindows 2022-08-25 13:28:50 +02:00