1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:18:11 +00:00

LibGfx: Add Gfx::Bitmap::create_shareable(format, size)

This helper allocates a shbuf and returns it wrapped in a Bitmap.
This commit is contained in:
Andreas Kling 2021-01-02 16:23:04 +01:00
parent fd08c93ef5
commit 0bc8d58c3b
2 changed files with 14 additions and 0 deletions

View file

@ -89,6 +89,7 @@ enum RotationDirection {
class Bitmap : public RefCounted<Bitmap> {
public:
static RefPtr<Bitmap> create(BitmapFormat, const IntSize&);
static RefPtr<Bitmap> create_shareable(BitmapFormat, const IntSize&);
static RefPtr<Bitmap> create_purgeable(BitmapFormat, const IntSize&);
static RefPtr<Bitmap> create_wrapper(BitmapFormat, const IntSize&, size_t pitch, void*);
static RefPtr<Bitmap> load_from_file(const StringView& path);