diff options
author | matcool <26722564+matcool@users.noreply.github.com> | 2023-04-02 10:24:52 -0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-04-03 07:13:13 +0200 |
commit | 1bd8f4eb03c30ea866525e4178c6a0a5f51d1964 (patch) | |
tree | 3c577b0a98dd56d429c0c32c5dc3a1e992aba8a9 /Userland | |
parent | 2259ddf9373252bcf9762d72d4b8638c988c8d77 (diff) | |
download | serenity-1bd8f4eb03c30ea866525e4178c6a0a5f51d1964.zip |
PixelPaint: Make Bloom use InplaceFilter instead of Filter
This change affects the filter preview widget, which would get the bloom
filter applied over the same bitmap, leading to an incorrect preview.
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Applications/PixelPaint/Filters/Bloom.cpp | 4 | ||||
-rw-r--r-- | Userland/Applications/PixelPaint/Filters/Bloom.h | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Applications/PixelPaint/Filters/Bloom.cpp b/Userland/Applications/PixelPaint/Filters/Bloom.cpp index aa51a7080f..589c36b55f 100644 --- a/Userland/Applications/PixelPaint/Filters/Bloom.cpp +++ b/Userland/Applications/PixelPaint/Filters/Bloom.cpp @@ -16,9 +16,9 @@ namespace PixelPaint::Filters { -void Bloom::apply(Gfx::Bitmap& target_bitmap, Gfx::Bitmap const& source_bitmap) const +void Bloom::apply(Gfx::Bitmap& target_bitmap) const { - auto intermediate_bitmap_or_error = source_bitmap.clone(); + auto intermediate_bitmap_or_error = target_bitmap.clone(); if (intermediate_bitmap_or_error.is_error()) return; diff --git a/Userland/Applications/PixelPaint/Filters/Bloom.h b/Userland/Applications/PixelPaint/Filters/Bloom.h index c089a5c4f1..68b258458f 100644 --- a/Userland/Applications/PixelPaint/Filters/Bloom.h +++ b/Userland/Applications/PixelPaint/Filters/Bloom.h @@ -6,20 +6,20 @@ #pragma once -#include "Filter.h" +#include "InplaceFilter.h" namespace PixelPaint::Filters { -class Bloom final : public Filter { +class Bloom final : public InplaceFilter { public: - virtual void apply(Gfx::Bitmap& target_bitmap, Gfx::Bitmap const& source_bitmap) const override; + virtual void apply(Gfx::Bitmap& target_bitmap) const override; virtual ErrorOr<RefPtr<GUI::Widget>> get_settings_widget() override; virtual StringView filter_name() const override { return "Bloom Filter"sv; } Bloom(ImageEditor* editor) - : Filter(editor) {}; + : InplaceFilter(editor) {}; private: int m_luma_lower { 128 }; |