/src/serenity/Userland/Libraries/LibGfx/ImmutableBitmap.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * Copyright (c) 2023, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com> |
3 | | * |
4 | | * SPDX-License-Identifier: BSD-2-Clause |
5 | | */ |
6 | | |
7 | | #include <LibGfx/ImmutableBitmap.h> |
8 | | |
9 | | namespace Gfx { |
10 | | |
11 | | static size_t s_next_immutable_bitmap_id = 0; |
12 | | |
13 | | NonnullRefPtr<ImmutableBitmap> ImmutableBitmap::create(NonnullRefPtr<Bitmap> bitmap) |
14 | 0 | { |
15 | 0 | return adopt_ref(*new ImmutableBitmap(move(bitmap))); |
16 | 0 | } |
17 | | |
18 | | ImmutableBitmap::ImmutableBitmap(NonnullRefPtr<Bitmap> bitmap) |
19 | 0 | : m_bitmap(move(bitmap)) |
20 | 0 | , m_id(s_next_immutable_bitmap_id++) |
21 | 0 | { |
22 | 0 | } |
23 | | |
24 | | } |