mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-13 11:42:38 +03:00
PaintBrush: Flood filling with the same color is a no-op.
This commit is contained in:
parent
1f51c2b7da
commit
264890bfc3
Notes:
sideshowbarker
2024-07-19 13:35:22 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/264890bfc36
@ -18,6 +18,9 @@ static void flood_fill(GraphicsBitmap& bitmap, const Point& start_position, Colo
|
||||
{
|
||||
ASSERT(bitmap.format() == GraphicsBitmap::Format::RGB32);
|
||||
|
||||
if (target_color == fill_color)
|
||||
return;
|
||||
|
||||
Queue<Point> queue;
|
||||
queue.enqueue(Point(start_position));
|
||||
while (!queue.is_empty()) {
|
||||
|
Loading…
Reference in New Issue
Block a user