Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/e41ad032fa35e33bd5fd960fe99f7c66686513db
...commit
http://git.netsurf-browser.org/netsurf.git/commit/e41ad032fa35e33bd5fd960fe99f7c66686513db
...tree
http://git.netsurf-browser.org/netsurf.git/tree/e41ad032fa35e33bd5fd960fe99f7c66686513db
The branch, master has been updated
via e41ad032fa35e33bd5fd960fe99f7c66686513db (commit)
via 4a4a442e6cd0a4f9eecd1608bc4fff7cf3cec7a0 (commit)
via 976e4f8973eea4b2b9904488ef92b66fc332521e (commit)
via d6e520da921e4a933318f1a70f0b2ff0c30dd2ea (commit)
via 9406645650932769567d306fccf011d60955e96d (commit)
from 43af94f0e5aa3253622e2815b01a22d8615a498c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=e41ad032fa35e33bd5fd960fe99f7c66686513db
commit e41ad032fa35e33bd5fd960fe99f7c66686513db
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>
cleanup printer API usage of plotter headers
diff --git a/amiga/print.c b/amiga/print.c
index f3fd211..cb6a4b5 100644
--- a/amiga/print.c
+++ b/amiga/print.c
@@ -49,6 +49,7 @@
#include "utils/nsoption.h"
#include "utils/messages.h"
#include "utils/utils.h"
+#include "desktop/plotters.h"
#include "desktop/printer.h"
#include "desktop/gui_layout.h"
#include "desktop/mouse.h"
diff --git a/desktop/print.c b/desktop/print.c
index 55caf51..711e907 100644
--- a/desktop/print.c
+++ b/desktop/print.c
@@ -35,6 +35,7 @@
#include "css/utils.h"
#include "render/box.h"
+#include "desktop/plotters.h"
#include "desktop/print.h"
#include "desktop/printer.h"
diff --git a/desktop/printer.h b/desktop/printer.h
index 7fda8bd..a683b3f 100644
--- a/desktop/printer.h
+++ b/desktop/printer.h
@@ -16,18 +16,19 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \file
+/**
+ * \file
* Printer interface.
*
- * Interface to generic plotters, initialization, handling pages and
- * cleaning up.
+ * Printer interface to generic plotters, initialization, handling
+ * pages and cleaning up.
*/
#ifndef NETSURF_DESKTOP_PRINTER_H
#define NETSURF_DESKTOP_PRINTER_H
-#include "desktop/plotters.h"
-#include "desktop/print.h"
+struct plotter_table;
+struct print_settings;
/** Printer interface */
struct printer{
diff --git a/gtk/print.c b/gtk/print.c
index 44ef175..a6e6399 100644
--- a/gtk/print.c
+++ b/gtk/print.c
@@ -36,6 +36,7 @@
#include "content/content.h"
#include "content/hlcache.h"
#include "utils/nsoption.h"
+#include "desktop/plotters.h"
#include "desktop/print.h"
#include "desktop/printer.h"
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=4a4a442e6cd0a4f9eecd1608bc4fff7cf3cec7a0
commit 4a4a442e6cd0a4f9eecd1608bc4fff7cf3cec7a0
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>
remove unused windows pretile code and plotter API use
diff --git a/windows/bitmap.c b/windows/bitmap.c
index e86f95b..6642448 100644
--- a/windows/bitmap.c
+++ b/windows/bitmap.c
@@ -31,6 +31,7 @@
#include "utils/log.h"
#include "image/bitmap.h"
+#include "desktop/plotters.h"
#include "content/content.h"
#include "windows/plot.h"
@@ -309,53 +310,6 @@ struct bitmap *bitmap_scale(struct bitmap *prescale, int
width, int height)
}
-struct bitmap *
-bitmap_pretile(struct bitmap *untiled,
- int width,
- int height,
- bitmap_flags_t flags)
-{
- struct bitmap *ret = malloc(sizeof(struct bitmap));
- if (ret == NULL)
- return NULL;
- int i, hrepeat, vrepeat, repeat;
- vrepeat = ((flags & BITMAPF_REPEAT_Y) != 0) ?
- ((height + untiled->height - 1) / untiled->height) : 1;
- hrepeat = ((flags & BITMAPF_REPEAT_X) != 0) ?
- ((width + untiled->width - 1) / untiled->width) : 1;
- width = untiled->width * hrepeat;
- height = untiled->height * vrepeat;
- uint8_t *indata = untiled->pixdata;
- uint8_t *newdata = malloc(4 * width * height);
- if (newdata == NULL) {
- free(ret);
- return NULL;
- }
- ret->pixdata = newdata;
- size_t stride = untiled->width * 4;
-
- /* horizontal tiling */
- for (i = 0; i < untiled->height; i++) {
- for (repeat = 0; repeat < hrepeat; repeat ++) {
- memcpy(newdata, indata, stride);
- newdata += stride;
- }
- indata += stride;
- }
-
- /* vertical tiling */
- stride = untiled->height * width * 4;
- newdata = ret->pixdata + stride;
- indata = ret->pixdata;
-
- for (repeat = 1; repeat < vrepeat; repeat++) {
- memcpy(newdata, indata, stride);
- newdata += stride;
- }
- ret->width = width;
- ret->height = height;
- return ret;
-}
static nserror
bitmap_render(struct bitmap *bitmap, struct hlcache_handle *content)
diff --git a/windows/bitmap.h b/windows/bitmap.h
index 434c5e9..c723159 100644
--- a/windows/bitmap.h
+++ b/windows/bitmap.h
@@ -20,8 +20,6 @@
#ifndef _NETSURF_WINDOWS_BITMAP_H_
#define _NETSURF_WINDOWS_BITMAP_H_
-#include "desktop/plotters.h"
-
struct gui_bitmap_table *win32_bitmap_table;
struct bitmap {
@@ -34,10 +32,9 @@ struct bitmap {
};
struct bitmap *bitmap_scale(struct bitmap *prescale, int width, int height);
-struct bitmap *bitmap_pretile(struct bitmap *untiled, int width, int height,
- bitmap_flags_t flags);
void *win32_bitmap_create(int width, int height, unsigned int state);
+
void win32_bitmap_destroy(void *bitmap);
#endif
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=976e4f8973eea4b2b9904488ef92b66fc332521e
commit 976e4f8973eea4b2b9904488ef92b66fc332521e
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>
rationalise gtk use of plotters API
diff --git a/gtk/cookies.c b/gtk/cookies.c
index 7b21dc9..f8f9893 100644
--- a/gtk/cookies.c
+++ b/gtk/cookies.c
@@ -24,7 +24,7 @@
#include "utils/log.h"
#include "desktop/cookie_manager.h"
-#include "desktop/plotters.h"
+#include "desktop/plot_style.h"
#include "desktop/tree.h"
#include "desktop/textinput.h"
diff --git a/gtk/history.c b/gtk/history.c
index 743474d..9c5c0b5 100644
--- a/gtk/history.c
+++ b/gtk/history.c
@@ -22,7 +22,7 @@
#include "utils/log.h"
#include "desktop/global_history.h"
-#include "desktop/plotters.h"
+#include "desktop/plot_style.h"
#include "desktop/tree.h"
#include "desktop/textinput.h"
diff --git a/gtk/hotlist.c b/gtk/hotlist.c
index 8258e09..06fd5cd 100644
--- a/gtk/hotlist.c
+++ b/gtk/hotlist.c
@@ -22,7 +22,6 @@
#include "utils/log.h"
#include "utils/nsoption.h"
#include "desktop/hotlist.h"
-#include "desktop/plotters.h"
#include "desktop/tree.h"
#include "gtk/plotters.h"
diff --git a/gtk/print.c b/gtk/print.c
index a6e6399..44ef175 100644
--- a/gtk/print.c
+++ b/gtk/print.c
@@ -36,7 +36,6 @@
#include "content/content.h"
#include "content/hlcache.h"
#include "utils/nsoption.h"
-#include "desktop/plotters.h"
#include "desktop/print.h"
#include "desktop/printer.h"
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=d6e520da921e4a933318f1a70f0b2ff0c30dd2ea
commit d6e520da921e4a933318f1a70f0b2ff0c30dd2ea
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>
improve plotter documentation header for monkey frontend
diff --git a/monkey/browser.c b/monkey/browser.c
index 4eef625..dfd2dcf 100644
--- a/monkey/browser.c
+++ b/monkey/browser.c
@@ -28,6 +28,7 @@
#include "desktop/mouse.h"
#include "desktop/gui_window.h"
#include "desktop/browser.h"
+#include "desktop/plotters.h"
#include "content/hlcache.h"
#include "monkey/browser.h"
@@ -423,7 +424,7 @@ monkey_window_handle_redraw(int argc, char **argv)
struct redraw_context ctx = {
.interactive = true,
.background_images = true,
- .plot = &monkey_plotters
+ .plot = monkey_plotters
};
if (argc != 3 && argc != 7) {
diff --git a/monkey/plot.c b/monkey/plot.c
index bd5b0a1..50f8124 100644
--- a/monkey/plot.c
+++ b/monkey/plot.c
@@ -95,7 +95,7 @@ monkey_plot_clip(const struct rect *clip)
return true;
}
-const struct plotter_table monkey_plotters = {
+static const struct plotter_table plotters = {
.clip = monkey_plot_clip,
.arc = monkey_plot_arc,
.disc = monkey_plot_disc,
@@ -107,3 +107,5 @@ const struct plotter_table monkey_plotters = {
.text = monkey_plot_text,
.option_knockout = true,
};
+
+const struct plotter_table* monkey_plotters = &plotters;
diff --git a/monkey/plot.h b/monkey/plot.h
index 7be3d69..3632bcf 100644
--- a/monkey/plot.h
+++ b/monkey/plot.h
@@ -1,5 +1,26 @@
+/*
+ * Copyright 2016 Vincent Sanders <[email protected]>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
-#include "desktop/plotters.h"
+#ifndef NS_MONKEY_PLOT_H
+#define NS_MONKEY_PLOT_H
-extern const struct plotter_table monkey_plotters;
+struct plotter_table;
+extern const struct plotter_table *monkey_plotters;
+
+#endif
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=9406645650932769567d306fccf011d60955e96d
commit 9406645650932769567d306fccf011d60955e96d
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>
reduce use of plotters header in framebuffer frontend
diff --git a/framebuffer/fbtk/event.c b/framebuffer/fbtk/event.c
index aab1502..c089492 100644
--- a/framebuffer/fbtk/event.c
+++ b/framebuffer/fbtk/event.c
@@ -32,7 +32,6 @@
#include "utils/utils.h"
#include "utils/log.h"
#include "desktop/browser.h"
-#include "desktop/plotters.h"
#include "desktop/textinput.h"
#include "framebuffer/gui.h"
diff --git a/framebuffer/fbtk/text.c b/framebuffer/fbtk/text.c
index 3d35583..258e9df 100644
--- a/framebuffer/fbtk/text.c
+++ b/framebuffer/fbtk/text.c
@@ -29,6 +29,7 @@
#include "utils/log.h"
#include "desktop/browser.h"
+#include "desktop/plotters.h"
#include "framebuffer/gui.h"
#include "framebuffer/fbtk.h"
diff --git a/framebuffer/fbtk/user.c b/framebuffer/fbtk/user.c
index 5be0f38..2b9cc87 100644
--- a/framebuffer/fbtk/user.c
+++ b/framebuffer/fbtk/user.c
@@ -22,7 +22,7 @@
#include <stdbool.h>
#include <libnsfb.h>
-#include "desktop/plotters.h"
+#include "desktop/plot_style.h"
#include "framebuffer/gui.h"
#include "framebuffer/fbtk.h"
diff --git a/framebuffer/framebuffer.c b/framebuffer/framebuffer.c
index 7d811aa..57dfecb 100644
--- a/framebuffer/framebuffer.c
+++ b/framebuffer/framebuffer.c
@@ -32,6 +32,7 @@
#include "utils/log.h"
#include "utils/utf8.h"
#include "desktop/browser.h"
+#include "desktop/plotters.h"
#include "image/bitmap.h"
#include "framebuffer/gui.h"
diff --git a/framebuffer/framebuffer.h b/framebuffer/framebuffer.h
index 5204dbd..d99049f 100644
--- a/framebuffer/framebuffer.h
+++ b/framebuffer/framebuffer.h
@@ -1,4 +1,28 @@
-#include "desktop/plotters.h"
+/*
+ * Copyright 2008 Vincent Sanders <[email protected]>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * \file
+ * framebuffer interface.
+ */
+
+#ifndef NETSURF_FB_FRAMEBUFFER_H
+#define NETSURF_FB_FRAMEBUFFER_H
extern const struct plotter_table fb_plotters;
@@ -12,3 +36,5 @@ bool framebuffer_set_cursor(struct fbtk_bitmap *bm);
* @return return old surface
*/
nsfb_t *framebuffer_set_surface(nsfb_t *new_nsfb);
+
+#endif
diff --git a/framebuffer/gui.c b/framebuffer/gui.c
index 7e48b65..b0b98c5 100644
--- a/framebuffer/gui.c
+++ b/framebuffer/gui.c
@@ -41,6 +41,8 @@
#include "desktop/gui_window.h"
#include "desktop/gui_misc.h"
#include "desktop/netsurf.h"
+#include "content/urldb.h"
+#include "content/fetch.h"
#include "framebuffer/gui.h"
#include "framebuffer/fbtk.h"
@@ -53,8 +55,6 @@
#include "framebuffer/fetch.h"
#include "framebuffer/bitmap.h"
-#include "content/urldb.h"
-#include "content/fetch.h"
#define NSFB_TOOLBAR_DEFAULT_LAYOUT "blfsrutc"
-----------------------------------------------------------------------
Summary of changes:
amiga/print.c | 1 +
desktop/print.c | 1 +
desktop/printer.h | 11 ++++++-----
framebuffer/fbtk/event.c | 1 -
framebuffer/fbtk/text.c | 1 +
framebuffer/fbtk/user.c | 2 +-
framebuffer/framebuffer.c | 1 +
framebuffer/framebuffer.h | 28 +++++++++++++++++++++++++-
framebuffer/gui.c | 4 ++--
gtk/cookies.c | 2 +-
gtk/history.c | 2 +-
gtk/hotlist.c | 1 -
monkey/browser.c | 3 ++-
monkey/plot.c | 4 +++-
monkey/plot.h | 25 +++++++++++++++++++++--
windows/bitmap.c | 48 +--------------------------------------------
windows/bitmap.h | 5 +----
17 files changed, 72 insertions(+), 68 deletions(-)
diff --git a/amiga/print.c b/amiga/print.c
index f3fd211..cb6a4b5 100644
--- a/amiga/print.c
+++ b/amiga/print.c
@@ -49,6 +49,7 @@
#include "utils/nsoption.h"
#include "utils/messages.h"
#include "utils/utils.h"
+#include "desktop/plotters.h"
#include "desktop/printer.h"
#include "desktop/gui_layout.h"
#include "desktop/mouse.h"
diff --git a/desktop/print.c b/desktop/print.c
index 55caf51..711e907 100644
--- a/desktop/print.c
+++ b/desktop/print.c
@@ -35,6 +35,7 @@
#include "css/utils.h"
#include "render/box.h"
+#include "desktop/plotters.h"
#include "desktop/print.h"
#include "desktop/printer.h"
diff --git a/desktop/printer.h b/desktop/printer.h
index 7fda8bd..a683b3f 100644
--- a/desktop/printer.h
+++ b/desktop/printer.h
@@ -16,18 +16,19 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \file
+/**
+ * \file
* Printer interface.
*
- * Interface to generic plotters, initialization, handling pages and
- * cleaning up.
+ * Printer interface to generic plotters, initialization, handling
+ * pages and cleaning up.
*/
#ifndef NETSURF_DESKTOP_PRINTER_H
#define NETSURF_DESKTOP_PRINTER_H
-#include "desktop/plotters.h"
-#include "desktop/print.h"
+struct plotter_table;
+struct print_settings;
/** Printer interface */
struct printer{
diff --git a/framebuffer/fbtk/event.c b/framebuffer/fbtk/event.c
index aab1502..c089492 100644
--- a/framebuffer/fbtk/event.c
+++ b/framebuffer/fbtk/event.c
@@ -32,7 +32,6 @@
#include "utils/utils.h"
#include "utils/log.h"
#include "desktop/browser.h"
-#include "desktop/plotters.h"
#include "desktop/textinput.h"
#include "framebuffer/gui.h"
diff --git a/framebuffer/fbtk/text.c b/framebuffer/fbtk/text.c
index 3d35583..258e9df 100644
--- a/framebuffer/fbtk/text.c
+++ b/framebuffer/fbtk/text.c
@@ -29,6 +29,7 @@
#include "utils/log.h"
#include "desktop/browser.h"
+#include "desktop/plotters.h"
#include "framebuffer/gui.h"
#include "framebuffer/fbtk.h"
diff --git a/framebuffer/fbtk/user.c b/framebuffer/fbtk/user.c
index 5be0f38..2b9cc87 100644
--- a/framebuffer/fbtk/user.c
+++ b/framebuffer/fbtk/user.c
@@ -22,7 +22,7 @@
#include <stdbool.h>
#include <libnsfb.h>
-#include "desktop/plotters.h"
+#include "desktop/plot_style.h"
#include "framebuffer/gui.h"
#include "framebuffer/fbtk.h"
diff --git a/framebuffer/framebuffer.c b/framebuffer/framebuffer.c
index 7d811aa..57dfecb 100644
--- a/framebuffer/framebuffer.c
+++ b/framebuffer/framebuffer.c
@@ -32,6 +32,7 @@
#include "utils/log.h"
#include "utils/utf8.h"
#include "desktop/browser.h"
+#include "desktop/plotters.h"
#include "image/bitmap.h"
#include "framebuffer/gui.h"
diff --git a/framebuffer/framebuffer.h b/framebuffer/framebuffer.h
index 5204dbd..d99049f 100644
--- a/framebuffer/framebuffer.h
+++ b/framebuffer/framebuffer.h
@@ -1,4 +1,28 @@
-#include "desktop/plotters.h"
+/*
+ * Copyright 2008 Vincent Sanders <[email protected]>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * \file
+ * framebuffer interface.
+ */
+
+#ifndef NETSURF_FB_FRAMEBUFFER_H
+#define NETSURF_FB_FRAMEBUFFER_H
extern const struct plotter_table fb_plotters;
@@ -12,3 +36,5 @@ bool framebuffer_set_cursor(struct fbtk_bitmap *bm);
* @return return old surface
*/
nsfb_t *framebuffer_set_surface(nsfb_t *new_nsfb);
+
+#endif
diff --git a/framebuffer/gui.c b/framebuffer/gui.c
index 7e48b65..b0b98c5 100644
--- a/framebuffer/gui.c
+++ b/framebuffer/gui.c
@@ -41,6 +41,8 @@
#include "desktop/gui_window.h"
#include "desktop/gui_misc.h"
#include "desktop/netsurf.h"
+#include "content/urldb.h"
+#include "content/fetch.h"
#include "framebuffer/gui.h"
#include "framebuffer/fbtk.h"
@@ -53,8 +55,6 @@
#include "framebuffer/fetch.h"
#include "framebuffer/bitmap.h"
-#include "content/urldb.h"
-#include "content/fetch.h"
#define NSFB_TOOLBAR_DEFAULT_LAYOUT "blfsrutc"
diff --git a/gtk/cookies.c b/gtk/cookies.c
index 7b21dc9..f8f9893 100644
--- a/gtk/cookies.c
+++ b/gtk/cookies.c
@@ -24,7 +24,7 @@
#include "utils/log.h"
#include "desktop/cookie_manager.h"
-#include "desktop/plotters.h"
+#include "desktop/plot_style.h"
#include "desktop/tree.h"
#include "desktop/textinput.h"
diff --git a/gtk/history.c b/gtk/history.c
index 743474d..9c5c0b5 100644
--- a/gtk/history.c
+++ b/gtk/history.c
@@ -22,7 +22,7 @@
#include "utils/log.h"
#include "desktop/global_history.h"
-#include "desktop/plotters.h"
+#include "desktop/plot_style.h"
#include "desktop/tree.h"
#include "desktop/textinput.h"
diff --git a/gtk/hotlist.c b/gtk/hotlist.c
index 8258e09..06fd5cd 100644
--- a/gtk/hotlist.c
+++ b/gtk/hotlist.c
@@ -22,7 +22,6 @@
#include "utils/log.h"
#include "utils/nsoption.h"
#include "desktop/hotlist.h"
-#include "desktop/plotters.h"
#include "desktop/tree.h"
#include "gtk/plotters.h"
diff --git a/monkey/browser.c b/monkey/browser.c
index 4eef625..dfd2dcf 100644
--- a/monkey/browser.c
+++ b/monkey/browser.c
@@ -28,6 +28,7 @@
#include "desktop/mouse.h"
#include "desktop/gui_window.h"
#include "desktop/browser.h"
+#include "desktop/plotters.h"
#include "content/hlcache.h"
#include "monkey/browser.h"
@@ -423,7 +424,7 @@ monkey_window_handle_redraw(int argc, char **argv)
struct redraw_context ctx = {
.interactive = true,
.background_images = true,
- .plot = &monkey_plotters
+ .plot = monkey_plotters
};
if (argc != 3 && argc != 7) {
diff --git a/monkey/plot.c b/monkey/plot.c
index bd5b0a1..50f8124 100644
--- a/monkey/plot.c
+++ b/monkey/plot.c
@@ -95,7 +95,7 @@ monkey_plot_clip(const struct rect *clip)
return true;
}
-const struct plotter_table monkey_plotters = {
+static const struct plotter_table plotters = {
.clip = monkey_plot_clip,
.arc = monkey_plot_arc,
.disc = monkey_plot_disc,
@@ -107,3 +107,5 @@ const struct plotter_table monkey_plotters = {
.text = monkey_plot_text,
.option_knockout = true,
};
+
+const struct plotter_table* monkey_plotters = &plotters;
diff --git a/monkey/plot.h b/monkey/plot.h
index 7be3d69..3632bcf 100644
--- a/monkey/plot.h
+++ b/monkey/plot.h
@@ -1,5 +1,26 @@
+/*
+ * Copyright 2016 Vincent Sanders <[email protected]>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
-#include "desktop/plotters.h"
+#ifndef NS_MONKEY_PLOT_H
+#define NS_MONKEY_PLOT_H
-extern const struct plotter_table monkey_plotters;
+struct plotter_table;
+extern const struct plotter_table *monkey_plotters;
+
+#endif
diff --git a/windows/bitmap.c b/windows/bitmap.c
index e86f95b..6642448 100644
--- a/windows/bitmap.c
+++ b/windows/bitmap.c
@@ -31,6 +31,7 @@
#include "utils/log.h"
#include "image/bitmap.h"
+#include "desktop/plotters.h"
#include "content/content.h"
#include "windows/plot.h"
@@ -309,53 +310,6 @@ struct bitmap *bitmap_scale(struct bitmap *prescale, int
width, int height)
}
-struct bitmap *
-bitmap_pretile(struct bitmap *untiled,
- int width,
- int height,
- bitmap_flags_t flags)
-{
- struct bitmap *ret = malloc(sizeof(struct bitmap));
- if (ret == NULL)
- return NULL;
- int i, hrepeat, vrepeat, repeat;
- vrepeat = ((flags & BITMAPF_REPEAT_Y) != 0) ?
- ((height + untiled->height - 1) / untiled->height) : 1;
- hrepeat = ((flags & BITMAPF_REPEAT_X) != 0) ?
- ((width + untiled->width - 1) / untiled->width) : 1;
- width = untiled->width * hrepeat;
- height = untiled->height * vrepeat;
- uint8_t *indata = untiled->pixdata;
- uint8_t *newdata = malloc(4 * width * height);
- if (newdata == NULL) {
- free(ret);
- return NULL;
- }
- ret->pixdata = newdata;
- size_t stride = untiled->width * 4;
-
- /* horizontal tiling */
- for (i = 0; i < untiled->height; i++) {
- for (repeat = 0; repeat < hrepeat; repeat ++) {
- memcpy(newdata, indata, stride);
- newdata += stride;
- }
- indata += stride;
- }
-
- /* vertical tiling */
- stride = untiled->height * width * 4;
- newdata = ret->pixdata + stride;
- indata = ret->pixdata;
-
- for (repeat = 1; repeat < vrepeat; repeat++) {
- memcpy(newdata, indata, stride);
- newdata += stride;
- }
- ret->width = width;
- ret->height = height;
- return ret;
-}
static nserror
bitmap_render(struct bitmap *bitmap, struct hlcache_handle *content)
diff --git a/windows/bitmap.h b/windows/bitmap.h
index 434c5e9..c723159 100644
--- a/windows/bitmap.h
+++ b/windows/bitmap.h
@@ -20,8 +20,6 @@
#ifndef _NETSURF_WINDOWS_BITMAP_H_
#define _NETSURF_WINDOWS_BITMAP_H_
-#include "desktop/plotters.h"
-
struct gui_bitmap_table *win32_bitmap_table;
struct bitmap {
@@ -34,10 +32,9 @@ struct bitmap {
};
struct bitmap *bitmap_scale(struct bitmap *prescale, int width, int height);
-struct bitmap *bitmap_pretile(struct bitmap *untiled, int width, int height,
- bitmap_flags_t flags);
void *win32_bitmap_create(int width, int height, unsigned int state);
+
void win32_bitmap_destroy(void *bitmap);
#endif
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org