diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2022-03-24 18:09:28 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2022-03-24 18:09:28 +0000 |
commit | 002c3c1a7c2ae7229afac3f1966892fd42895aec (patch) | |
tree | bc9c769b176981296b5e92233fd623b3164a4513 /frontends/beos/bitmap.cpp | |
parent | c2d72d1e9361b3017872e5aff16cfe9a894f3048 (diff) | |
download | netsurf-002c3c1a7c2ae7229afac3f1966892fd42895aec.tar.gz netsurf-002c3c1a7c2ae7229afac3f1966892fd42895aec.tar.bz2 |
Bitmap API: Clean up creation flags.
Diffstat (limited to 'frontends/beos/bitmap.cpp')
-rw-r--r-- | frontends/beos/bitmap.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/frontends/beos/bitmap.cpp b/frontends/beos/bitmap.cpp index 7b6d00d1a..83e69fce5 100644 --- a/frontends/beos/bitmap.cpp +++ b/frontends/beos/bitmap.cpp @@ -114,28 +114,28 @@ static inline void nsbeos_rgba_to_bgra(void *src, * Create a bitmap. * * \param width width of image in pixels - * \param height width of image in pixels - * \param state a flag word indicating the initial state + * \param height height of image in pixels + * \param bflags flags for bitmap creation * \return an opaque struct bitmap, or NULL on memory exhaustion */ -static void *bitmap_create(int width, int height, unsigned int state) +static void *bitmap_create(int width, int height, enum gui_bitmap_flags flags) { struct bitmap *bmp = (struct bitmap *)malloc(sizeof(struct bitmap)); if (bmp == NULL) return NULL; - int32 flags = 0; - if (state & BITMAP_CLEAR_MEMORY) - flags |= B_BITMAP_CLEAR_TO_WHITE; + int32 Bflags = 0; + if (flags & BITMAP_CLEAR) + Bflags |= B_BITMAP_CLEAR_TO_WHITE; BRect frame(0, 0, width - 1, height - 1); //XXX: bytes per row ? - bmp->primary = new BBitmap(frame, flags, B_RGBA32); - bmp->shadow = new BBitmap(frame, flags, B_RGBA32); + bmp->primary = new BBitmap(frame, Bflags, B_RGBA32); + bmp->shadow = new BBitmap(frame, Bflags, B_RGBA32); bmp->pretile_x = bmp->pretile_y = bmp->pretile_xy = NULL; - bmp->opaque = (state & BITMAP_OPAQUE) != 0; + bmp->opaque = (flags & BITMAP_OPAQUE) != 0; return bmp; } |