ladybird/Applications/PixelPaint
Tom 75f61fe3d9 AK: Make RefPtr, NonnullRefPtr, WeakPtr thread safe
This makes most operations thread safe, especially so that they
can safely be used in the Kernel. This includes obtaining a strong
reference from a weak reference, which now requires an explicit
call to WeakPtr::strong_ref(). Another major change is that
Weakable::make_weak_ref() may require the explicit target type.
Previously we used reinterpret_cast in WeakPtr, assuming that it
can be properly converted. But WeakPtr does not necessarily have
the knowledge to be able to do this. Instead, we now ask the class
itself to deliver a WeakPtr to the type that we want.

Also, WeakLink is no longer specific to a target type. The reason
for this is that we want to be able to safely convert e.g. WeakPtr<T>
to WeakPtr<U>, and before this we just reinterpret_cast the internal
WeakLink<T> to WeakLink<U>, which is a bold assumption that it would
actually produce the correct code. Instead, WeakLink now operates
on just a raw pointer and we only make those constructors/operators
available if we can verify that it can be safely cast.

In order to guarantee thread safety, we now use the least significant
bit in the pointer for locking purposes. This also means that only
properly aligned pointers can be used.
2020-11-10 19:11:52 +01:00
..
BrushTool.cpp PixelPaint: Tool properties panel 2020-10-16 00:03:53 +02:00
BrushTool.h PixelPaint: Tool properties panel 2020-10-16 00:03:53 +02:00
BucketTool.cpp PixelPaint: Tool properties panel 2020-10-16 00:03:53 +02:00
BucketTool.h PixelPaint: Tool properties panel 2020-10-16 00:03:53 +02:00
CMakeLists.txt PixelPaint: Tool properties panel 2020-10-16 00:03:53 +02:00
CreateNewLayerDialog.cpp Applications: Use application icons for dialog windows 2020-10-31 13:48:15 +01:00
CreateNewLayerDialog.h Meta+Applications: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
EllipseTool.cpp Meta: Replace remaining LibM/math.h includes with math.h 2020-08-12 16:18:33 +02:00
EllipseTool.h Meta+Applications: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
EraseTool.cpp LibGfx: Rename Rect,Point,Size => IntRect,IntPoint,IntSize 2020-06-10 10:59:04 +02:00
EraseTool.h Meta+Applications: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
FilterParams.h LibGfx+PixelPaint: Fix distortions in convolutions with size != 4 or 5 2020-10-12 20:04:48 +02:00
Image.cpp PixelPaint: Allow pasting a copied bitmap as a new layer :^) 2020-09-05 16:53:51 +02:00
Image.h Meta+Applications: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
ImageEditor.cpp LibGUI: Add Widget focus policies 2020-10-30 17:03:28 +01:00
ImageEditor.h LibGUI: Add Widget focus policies 2020-10-30 17:03:28 +01:00
Layer.cpp PixelPaint: Allow pasting a copied bitmap as a new layer :^) 2020-09-05 16:53:51 +02:00
Layer.h PixelPaint: Allow pasting a copied bitmap as a new layer :^) 2020-09-05 16:53:51 +02:00
LayerListWidget.cpp LibGfx: Rename Rect,Point,Size => IntRect,IntPoint,IntSize 2020-06-10 10:59:04 +02:00
LayerListWidget.h LibGfx: Rename Rect,Point,Size => IntRect,IntPoint,IntSize 2020-06-10 10:59:04 +02:00
LayerPropertiesWidget.cpp PixelPaint: Add GUI for editing layer names :^) 2020-07-23 20:48:28 +02:00
LayerPropertiesWidget.h PixelPaint: Add GUI for editing layer names :^) 2020-07-23 20:48:28 +02:00
LineTool.cpp Meta: Replace remaining LibM/math.h includes with math.h 2020-08-12 16:18:33 +02:00
LineTool.h LibGfx: Rename Rect,Point,Size => IntRect,IntPoint,IntSize 2020-06-10 10:59:04 +02:00
main.cpp PixelPaint: Tool properties panel 2020-10-16 00:03:53 +02:00
MoveTool.cpp Meta+Applications: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
MoveTool.h LibGfx: Rename Rect,Point,Size => IntRect,IntPoint,IntSize 2020-06-10 10:59:04 +02:00
PaletteWidget.cpp LibGfx: Rename Rect,Point,Size => IntRect,IntPoint,IntSize 2020-06-10 10:59:04 +02:00
PaletteWidget.h PixelPaint: Rename from PaintBrush :^) 2020-05-20 20:35:35 +02:00
PenTool.cpp PixelPaint: Tool properties panel 2020-10-16 00:03:53 +02:00
PenTool.h PixelPaint: Tool properties panel 2020-10-16 00:03:53 +02:00
PickerTool.cpp PixelPaint: Rename from PaintBrush :^) 2020-05-20 20:35:35 +02:00
PickerTool.h Meta+Applications: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
RectangleTool.cpp Meta: Replace remaining LibM/math.h includes with math.h 2020-08-12 16:18:33 +02:00
RectangleTool.h Meta+Applications: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
SprayTool.cpp PixelPaint: Tool properties panel 2020-10-16 00:03:53 +02:00
SprayTool.h PixelPaint: Tool properties panel 2020-10-16 00:03:53 +02:00
Tool.cpp AK: Make RefPtr, NonnullRefPtr, WeakPtr thread safe 2020-11-10 19:11:52 +01:00
Tool.h PixelPaint: Tool properties panel 2020-10-16 00:03:53 +02:00
ToolboxWidget.cpp PixelPaint: Basic brush tool 2020-10-14 20:36:40 +02:00
ToolboxWidget.h PixelPaint: Scope tool actions to the containing window 2020-07-23 19:53:48 +02:00
ToolPropertiesWidget.cpp PixelPaint: Tool properties panel 2020-10-16 00:03:53 +02:00
ToolPropertiesWidget.h PixelPaint: Tool properties panel 2020-10-16 00:03:53 +02:00