diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2022-03-29 15:25:33 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2022-03-29 15:25:33 +0100 |
commit | 8e56cc3b1a0d9d18e35811a015cf42b57ede1025 (patch) | |
tree | c3ec6fc87924e500e168986a6921f6bff93cd280 /frontends/atari/bitmap.c | |
parent | cfbd16cf7ea3335b7ac75989c4ffa63306224dfc (diff) | |
download | netsurf-8e56cc3b1a0d9d18e35811a015cf42b57ede1025.tar.gz netsurf-8e56cc3b1a0d9d18e35811a015cf42b57ede1025.tar.bz2 |
Bitmap: Implement test_opaque in core instead of in every frontend.
Diffstat (limited to 'frontends/atari/bitmap.c')
-rw-r--r-- | frontends/atari/bitmap.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/frontends/atari/bitmap.c b/frontends/atari/bitmap.c index 8c467c7d6..9b5a016a5 100644 --- a/frontends/atari/bitmap.c +++ b/frontends/atari/bitmap.c @@ -269,40 +269,6 @@ static void bitmap_set_opaque(void *bitmap, bool opaque) } -/** - * Tests whether a bitmap has an opaque alpha channel - * - * \param bitmap a bitmap, as returned by bitmap_create() - * \return whether the bitmap is opaque - */ -static bool bitmap_test_opaque(void *bitmap) -{ - int tst; - struct bitmap *bm = bitmap; - - if (bitmap == NULL) { - NSLOG(netsurf, INFO, "NULL bitmap!"); - return false; - } - - if( nsoption_int(atari_transparency) == 0 ){ - return( true ); - } - - tst = bm->width * bm->height; - - while (tst-- > 0) { - if (bm->pixdata[(tst << 2) + 3] != 0xff) { - NSLOG(netsurf, INFO, - "bitmap %p has transparency", bm); - return false; - } - } - NSLOG(netsurf, INFO, "bitmap %p is opaque", bm); - return true; -} - - /* exported interface documented in atari/bitmap.h */ bool atari_bitmap_get_opaque(void *bitmap) { @@ -414,7 +380,6 @@ static struct gui_bitmap_table bitmap_table = { .destroy = atari_bitmap_destroy, .set_opaque = bitmap_set_opaque, .get_opaque = atari_bitmap_get_opaque, - .test_opaque = bitmap_test_opaque, .get_buffer = bitmap_get_buffer, .get_rowstride = atari_bitmap_get_rowstride, .get_width = atari_bitmap_get_width, |