summaryrefslogtreecommitdiff
path: root/frontends/windows
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2022-03-29 15:25:33 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2022-03-29 15:25:33 +0100
commit8e56cc3b1a0d9d18e35811a015cf42b57ede1025 (patch)
treec3ec6fc87924e500e168986a6921f6bff93cd280 /frontends/windows
parentcfbd16cf7ea3335b7ac75989c4ffa63306224dfc (diff)
downloadnetsurf-8e56cc3b1a0d9d18e35811a015cf42b57ede1025.tar.gz
netsurf-8e56cc3b1a0d9d18e35811a015cf42b57ede1025.tar.bz2
Bitmap: Implement test_opaque in core instead of in every frontend.
Diffstat (limited to 'frontends/windows')
-rw-r--r--frontends/windows/bitmap.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/frontends/windows/bitmap.c b/frontends/windows/bitmap.c
index 26bc807ce..a52f29ad9 100644
--- a/frontends/windows/bitmap.c
+++ b/frontends/windows/bitmap.c
@@ -193,35 +193,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;
- }
-
- 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;
-}
-
-
-/**
* Gets whether a bitmap should be plotted opaque
*
* \param bitmap a bitmap, as returned by bitmap_create()
@@ -356,7 +327,6 @@ static struct gui_bitmap_table bitmap_table = {
.destroy = win32_bitmap_destroy,
.set_opaque = bitmap_set_opaque,
.get_opaque = bitmap_get_opaque,
- .test_opaque = bitmap_test_opaque,
.get_buffer = bitmap_get_buffer,
.get_rowstride = bitmap_get_rowstride,
.get_width = bitmap_get_width,