mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:47:35 +00:00
GraphicsBitmap: create_wrapper() should take pitch as a parameter
We shouldn't assume that the pitch of some arbitrary bitmap memory that we're wrapping is going to be 16-byte aligned. Instead, just take the pitch as a parameter. Also update WindowServer to pass the pitch to the framebuffer bitmaps.
This commit is contained in:
parent
d11d847161
commit
7038935f74
4 changed files with 13 additions and 9 deletions
|
@ -20,7 +20,7 @@ public:
|
|||
};
|
||||
|
||||
static NonnullRefPtr<GraphicsBitmap> create(Format, const Size&);
|
||||
static NonnullRefPtr<GraphicsBitmap> create_wrapper(Format, const Size&, RGBA32*);
|
||||
static NonnullRefPtr<GraphicsBitmap> create_wrapper(Format, const Size&, size_t pitch, RGBA32*);
|
||||
static RefPtr<GraphicsBitmap> load_from_file(const StringView& path);
|
||||
static RefPtr<GraphicsBitmap> load_from_file(Format, const StringView& path, const Size&);
|
||||
static NonnullRefPtr<GraphicsBitmap> create_with_shared_buffer(Format, NonnullRefPtr<SharedBuffer>&&, const Size&);
|
||||
|
@ -94,7 +94,7 @@ public:
|
|||
|
||||
private:
|
||||
GraphicsBitmap(Format, const Size&);
|
||||
GraphicsBitmap(Format, const Size&, RGBA32*);
|
||||
GraphicsBitmap(Format, const Size&, size_t pitch, RGBA32*);
|
||||
GraphicsBitmap(Format, const Size&, MappedFile&&);
|
||||
GraphicsBitmap(Format, NonnullRefPtr<SharedBuffer>&&, const Size&);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue