netsurf: branch master updated. release/3.3-104-g921f15b
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/921f15bb7d543390cfbd1...
...commit http://git.netsurf-browser.org/netsurf.git/commit/921f15bb7d543390cfbd19c...
...tree http://git.netsurf-browser.org/netsurf.git/tree/921f15bb7d543390cfbd19cea...
The branch, master has been updated
via 921f15bb7d543390cfbd19cea9e30b527e7f6c28 (commit)
from 98171fae629aa0459faaf274f77c4049e3e74f92 (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=921f15bb7d543390cfb...
commit 921f15bb7d543390cfbd19cea9e30b527e7f6c28
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Highlight the mark element.
diff --git a/!NetSurf/Resources/CSS,f79 b/!NetSurf/Resources/CSS,f79
index 6859bbd..9ee7388 100644
--- a/!NetSurf/Resources/CSS,f79
+++ b/!NetSurf/Resources/CSS,f79
@@ -149,3 +149,8 @@ noembed, script, style, title { display: none; }
article, aside, figcaption, figure, footer, header, main, nav, section {
display: block;
}
+
+mark {
+ background: yellow;
+ color: black;
+}
-----------------------------------------------------------------------
Summary of changes:
!NetSurf/Resources/CSS,f79 | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/!NetSurf/Resources/CSS,f79 b/!NetSurf/Resources/CSS,f79
index 6859bbd..9ee7388 100644
--- a/!NetSurf/Resources/CSS,f79
+++ b/!NetSurf/Resources/CSS,f79
@@ -149,3 +149,8 @@ noembed, script, style, title { display: none; }
article, aside, figcaption, figure, footer, header, main, nav, section {
display: block;
}
+
+mark {
+ background: yellow;
+ color: black;
+}
--
NetSurf Browser
8 years, 1 month
netsurf: branch master updated. release/3.3-103-g98171fa
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/98171fae629aa0459faaf...
...commit http://git.netsurf-browser.org/netsurf.git/commit/98171fae629aa0459faaf27...
...tree http://git.netsurf-browser.org/netsurf.git/tree/98171fae629aa0459faaf274f...
The branch, master has been updated
via 98171fae629aa0459faaf274f77c4049e3e74f92 (commit)
from 69776768d2e6fe20bf2346d164e37420f553a2d7 (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=98171fae629aa0459fa...
commit 98171fae629aa0459faaf274f77c4049e3e74f92
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Style HTML5's new block level elements as blocks.
diff --git a/!NetSurf/Resources/CSS,f79 b/!NetSurf/Resources/CSS,f79
index 0ac6738..6859bbd 100644
--- a/!NetSurf/Resources/CSS,f79
+++ b/!NetSurf/Resources/CSS,f79
@@ -144,3 +144,8 @@ textarea[readonly] { background-color: #ddd; color: #333; }
fieldset { display: block; border: thin solid #888; margin: 1.12em 0; }
noembed, script, style, title { display: none; }
+
+/* HTML5 elements */
+article, aside, figcaption, figure, footer, header, main, nav, section {
+ display: block;
+}
-----------------------------------------------------------------------
Summary of changes:
!NetSurf/Resources/CSS,f79 | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/!NetSurf/Resources/CSS,f79 b/!NetSurf/Resources/CSS,f79
index 0ac6738..6859bbd 100644
--- a/!NetSurf/Resources/CSS,f79
+++ b/!NetSurf/Resources/CSS,f79
@@ -144,3 +144,8 @@ textarea[readonly] { background-color: #ddd; color: #333; }
fieldset { display: block; border: thin solid #888; margin: 1.12em 0; }
noembed, script, style, title { display: none; }
+
+/* HTML5 elements */
+article, aside, figcaption, figure, footer, header, main, nav, section {
+ display: block;
+}
--
NetSurf Browser
8 years, 1 month
netsurf: branch master updated. release/3.3-102-g6977676
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/69776768d2e6fe20bf234...
...commit http://git.netsurf-browser.org/netsurf.git/commit/69776768d2e6fe20bf2346d...
...tree http://git.netsurf-browser.org/netsurf.git/tree/69776768d2e6fe20bf2346d16...
The branch, master has been updated
via 69776768d2e6fe20bf2346d164e37420f553a2d7 (commit)
from df3a8894357444704ec6c72df2dd3b2161e3f4c7 (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=69776768d2e6fe20bf2...
commit 69776768d2e6fe20bf2346d164e37420f553a2d7
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Remove duplicate branch in relative position handling.
diff --git a/render/layout.c b/render/layout.c
index 67e3219..9b479da 100644
--- a/render/layout.c
+++ b/render/layout.c
@@ -4493,14 +4493,14 @@ void layout_compute_relative_offset(struct box *box, int *x, int *y)
assert(left == -right);
- if (top == AUTO && bottom == AUTO)
+ if (top == AUTO && bottom == AUTO) {
top = bottom = 0;
- else if (top == AUTO)
+ } else if (top == AUTO) {
top = -bottom;
- else if (bottom == AUTO)
- bottom = -top;
- else
+ } else {
+ /* bottom is AUTO, or neither are AUTO */
bottom = -top;
+ }
#ifdef LAYOUT_DEBUG
LOG(("left %i, right %i, top %i, bottom %i", left, right, top, bottom));
-----------------------------------------------------------------------
Summary of changes:
render/layout.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/render/layout.c b/render/layout.c
index 67e3219..9b479da 100644
--- a/render/layout.c
+++ b/render/layout.c
@@ -4493,14 +4493,14 @@ void layout_compute_relative_offset(struct box *box, int *x, int *y)
assert(left == -right);
- if (top == AUTO && bottom == AUTO)
+ if (top == AUTO && bottom == AUTO) {
top = bottom = 0;
- else if (top == AUTO)
+ } else if (top == AUTO) {
top = -bottom;
- else if (bottom == AUTO)
- bottom = -top;
- else
+ } else {
+ /* bottom is AUTO, or neither are AUTO */
bottom = -top;
+ }
#ifdef LAYOUT_DEBUG
LOG(("left %i, right %i, top %i, bottom %i", left, right, top, bottom));
--
NetSurf Browser
8 years, 1 month
netsurf: branch master updated. release/3.3-101-gdf3a889
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/df3a8894357444704ec6c...
...commit http://git.netsurf-browser.org/netsurf.git/commit/df3a8894357444704ec6c72...
...tree http://git.netsurf-browser.org/netsurf.git/tree/df3a8894357444704ec6c72df...
The branch, master has been updated
via df3a8894357444704ec6c72df2dd3b2161e3f4c7 (commit)
from e7f9dbcb10594a46c559d0ae7c7ed26ede8af9a2 (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=df3a8894357444704ec...
commit df3a8894357444704ec6c72df2dd3b2161e3f4c7
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Ensure we delink form controls when freeing them
diff --git a/render/form.c b/render/form.c
index a2b661e..34029df 100644
--- a/render/form.c
+++ b/render/form.c
@@ -215,6 +215,7 @@ void form_add_control(struct form *form, struct form_control *control)
*/
void form_free_control(struct form_control *control)
{
+ struct form_control *c;
assert(control != NULL);
LOG(("Control:%p name:%p value:%p initial:%p", control, control->name, control->value, control->initial_value));
@@ -251,6 +252,24 @@ void form_free_control(struct form_control *control)
}
}
+ /* unlink the control from the form */
+ for (c = control->form->controls; c != NULL; c = c->next) {
+ if (c->next == control) {
+ c->next = control->next;
+ if (control->form->last_control == control)
+ control->form->last_control = c;
+ break;
+ }
+ if (c == control) {
+ /* can only happen if control was first control */
+ control->form->controls = control->next;
+ if (control->form->last_control == control)
+ control->form->controls =
+ control->form->last_control = NULL;
+ break;
+ }
+ }
+
free(control);
}
-----------------------------------------------------------------------
Summary of changes:
render/form.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/render/form.c b/render/form.c
index a2b661e..34029df 100644
--- a/render/form.c
+++ b/render/form.c
@@ -215,6 +215,7 @@ void form_add_control(struct form *form, struct form_control *control)
*/
void form_free_control(struct form_control *control)
{
+ struct form_control *c;
assert(control != NULL);
LOG(("Control:%p name:%p value:%p initial:%p", control, control->name, control->value, control->initial_value));
@@ -251,6 +252,24 @@ void form_free_control(struct form_control *control)
}
}
+ /* unlink the control from the form */
+ for (c = control->form->controls; c != NULL; c = c->next) {
+ if (c->next == control) {
+ c->next = control->next;
+ if (control->form->last_control == control)
+ control->form->last_control = c;
+ break;
+ }
+ if (c == control) {
+ /* can only happen if control was first control */
+ control->form->controls = control->next;
+ if (control->form->last_control == control)
+ control->form->controls =
+ control->form->last_control = NULL;
+ break;
+ }
+ }
+
free(control);
}
--
NetSurf Browser
8 years, 1 month
netsurf: branch master updated. release/3.3-100-ge7f9dbc
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/e7f9dbcb10594a46c559d...
...commit http://git.netsurf-browser.org/netsurf.git/commit/e7f9dbcb10594a46c559d0a...
...tree http://git.netsurf-browser.org/netsurf.git/tree/e7f9dbcb10594a46c559d0ae7...
The branch, master has been updated
via e7f9dbcb10594a46c559d0ae7c7ed26ede8af9a2 (commit)
from 19abe9bddfaeba06222ded85ca1e3430c4414354 (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=e7f9dbcb10594a46c55...
commit e7f9dbcb10594a46c559d0ae7c7ed26ede8af9a2
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
Remove webp image handling
The bitmap and image handling interfaces have changed within NetSurf
and the webp image handling has not been fixed up appropriately to
cope.
After discussion with the other developers it has been decided that
the webp support is not worth the necessary development effort to
rewrite and maintain.
The webp format is not in wide usage and Mozilla, Microsoft and Apple
have not adopted it. This means the removal will not adversely impact
NetSurf.
Resolves:2310
diff --git a/Makefile.defaults b/Makefile.defaults
index b8261ff..e2d7999 100644
--- a/Makefile.defaults
+++ b/Makefile.defaults
@@ -47,10 +47,6 @@ NETSURF_USE_JPEG := YES
# Valid options: YES, NO (highly recommended)
NETSURF_USE_PNG := YES
-# Enable NetSurf's use of libwebp for displaying WebPs
-# Valid options: YES, NO
-NETSURF_USE_WEBP := NO
-
# Enable NetSurf's use of gstreamer for displaying videos
# Valid options: YES, NO
NETSURF_USE_VIDEO := NO
diff --git a/amiga/Makefile.defaults b/amiga/Makefile.defaults
index cfd6a76..0674a9d 100644
--- a/amiga/Makefile.defaults
+++ b/amiga/Makefile.defaults
@@ -14,10 +14,6 @@ endif
# Valid options: YES, NO, AUTO
NETSURF_USE_ROSPRITE := NO
-# Enable NetSurf's use of libwebp for displaying WebPs
-# Valid options: YES, NO
-NETSURF_USE_WEBP := NO
-
# Enable NetSurf to display Amiga icons
# Valid options: YES, NO (recommended)
NETSURF_USE_AMIGA_ICON := YES
diff --git a/amiga/Makefile.target b/amiga/Makefile.target
index 10e759b..5c7bc3b 100644
--- a/amiga/Makefile.target
+++ b/amiga/Makefile.target
@@ -14,7 +14,6 @@ NETSURF_FEATURE_ROSPRITE_CFLAGS := -DWITH_NSSPRITE
NETSURF_FEATURE_BMP_CFLAGS := -DWITH_BMP
NETSURF_FEATURE_GIF_CFLAGS := -DWITH_GIF
NETSURF_FEATURE_PNG_CFLAGS := -DWITH_PNG
-NETSURF_FEATURE_WEBP_CFLAGS := -DWITH_WEBP
NETSURF_FEATURE_NSSVG_CFLAGS := -DWITH_NS_SVG
NETSURF_FEATURE_VIDEO_CFLAGS := -DWITH_VIDEO
@@ -24,7 +23,6 @@ ifeq ($(HOST),amiga)
$(eval $(call feature_enabled,GIF,-DWITH_GIF,-lnsgif,GIF (libnsgif)))
$(eval $(call feature_enabled,PNG,-DWITH_PNG,-lpng,PNG (libpng) ))
$(eval $(call feature_enabled,NSSVG,-DWITH_NS_SVG,-lsvgtiny,SVG (libsvgtiny)))
- $(eval $(call feature_enabled,WEBP,-DWITH_WEBP,-lwebp,WebP (libwebp)))
$(eval $(call feature_enabled,VIDEO,-DWITH_VIDEO -I /SDK/local/newlib/include/glib-2.0,-lgstreamer-0.10 -lglib-2.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lintl -lffi,Video (libgstreamer)))
$(eval $(call feature_enabled,JS,-DXP_UNIX -DWITH_JS -DJS_VERSION=185,-lstdc++ -lmozjs185,JavaScript))
$(eval $(call feature_enabled,MOZJS,-DXP_AMIGA -DWITH_MOZJS -DJS_VERSION=170 -DJSVERSION_LATEST=170 -DJSOPTION_JIT=0 -DJSCLASS_GLOBAL_FLAGS=0,-ljs -lfdlibm,JavaScript))
diff --git a/atari/Makefile.defaults b/atari/Makefile.defaults
index 211c8e6..b738b48 100644
--- a/atari/Makefile.defaults
+++ b/atari/Makefile.defaults
@@ -10,10 +10,6 @@ NETSURF_USE_LIBICONV_PLUG := NO
# Valid options: YES, NO, AUTO
NETSURF_USE_ROSPRITE := NO
-# Enable NetSurf's use of libwebp for displaying WebPs
-# Valid options: YES, NO
-NETSURF_USE_WEBP := NO
-
# Enable NetSurf's use of librsvg in conjunction with Cairo to display SVGs
# Valid options: YES, NO, AUTO
NETSURF_USE_RSVG := AUTO
diff --git a/cocoa/Makefile.defaults b/cocoa/Makefile.defaults
index 50da667..17c5df9 100644
--- a/cocoa/Makefile.defaults
+++ b/cocoa/Makefile.defaults
@@ -10,10 +10,6 @@ NETSURF_USE_LIBICONV_PLUG := NO
# Valid options: YES, NO, AUTO
NETSURF_USE_ROSPRITE := NO
-# Enable NetSurf's use of libwebp for displaying WebPs
-# Valid options: YES, NO
-NETSURF_USE_WEBP := NO
-
# Enable NetSurf's use of librsvg in conjunction with Cairo to display SVGs
# Valid options: YES, NO, AUTO
NETSURF_USE_RSVG := AUTO
diff --git a/gtk/Makefile.target b/gtk/Makefile.target
index d03f4f9..8378c10 100644
--- a/gtk/Makefile.target
+++ b/gtk/Makefile.target
@@ -14,7 +14,6 @@ NETSURF_FEATURE_ROSPRITE_CFLAGS := -DWITH_NSSPRITE
NETSURF_FEATURE_BMP_CFLAGS := -DWITH_BMP
NETSURF_FEATURE_GIF_CFLAGS := -DWITH_GIF
NETSURF_FEATURE_PNG_CFLAGS := -DWITH_PNG
-NETSURF_FEATURE_WEBP_CFLAGS := -DWITH_WEBP
NETSURF_FEATURE_JS_CFLAGS := -DWITH_JS -DJS_HAS_FILE_OBJECT=0
NETSURF_FEATURE_MOZJS_CFLAGS := -DWITH_MOZJS -DJS_HAS_FILE_OBJECT=0
NETSURF_FEATURE_VIDEO_CFLAGS := -DWITH_VIDEO
@@ -27,7 +26,6 @@ $(eval $(call pkg_config_find_and_add_enabled,GIF,libnsgif,GIF))
$(eval $(call pkg_config_find_and_add_enabled,RSVG,librsvg-2.0,SVG))
$(eval $(call pkg_config_find_and_add_enabled,NSSVG,libsvgtiny,SVG))
$(eval $(call pkg_config_find_and_add_enabled,ROSPRITE,librosprite,Sprite))
-$(eval $(call feature_enabled,WEBP,-DWITH_WEBP,-lwebp,WebP (libwebp)))
$(eval $(call pkg_config_find_and_add_enabled,MOZJS,mozjs185,JavaScript))
$(eval $(call pkg_config_find_and_add_enabled,JS,mozilla-js,JavaScript))
$(eval $(call pkg_config_find_and_add_enabled,VIDEO,gstreamer-0.10,Video))
diff --git a/image/Makefile b/image/Makefile
index 9992c54..5851a1c 100644
--- a/image/Makefile
+++ b/image/Makefile
@@ -10,7 +10,6 @@ S_IMAGE_$(NETSURF_USE_ROSPRITE) += nssprite.c
S_IMAGE_$(NETSURF_USE_PNG) += png.c
S_IMAGE_$(NETSURF_USE_NSSVG) += svg.c
S_IMAGE_$(NETSURF_USE_RSVG) += rsvg.c
-S_IMAGE_$(NETSURF_USE_WEBP) += webp.c
S_IMAGE_$(NETSURF_USE_VIDEO) += video.c
S_IMAGE := $(addprefix image/,$(S_IMAGE_YES))
diff --git a/image/image.c b/image/image.c
index 339f775..49dc2b8 100644
--- a/image/image.c
+++ b/image/image.c
@@ -34,7 +34,6 @@
#include "image/png.h"
#include "image/rsvg.h"
#include "image/svg.h"
-#include "image/webp.h"
#include "image/image.h"
/**
@@ -94,12 +93,6 @@ nserror image_init(void)
return error;
#endif
-#ifdef WITH_WEBP
- error = webp_init();
- if (error != NSERROR_OK)
- return error;
-#endif /* WITH_WEBP */
-
return NSERROR_OK;
}
diff --git a/image/webp.c b/image/webp.c
deleted file mode 100644
index fc4356c..0000000
--- a/image/webp.c
+++ /dev/null
@@ -1,229 +0,0 @@
- /*
- * Copyright 2010 Chris Young <chris(a)unsatisfactorysoftware.co.uk>
- *
- * 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
- * Content for image/webp (libwebp implementation).
- *
- */
-
-#include <assert.h>
-#include <string.h>
-#include <stdlib.h>
-#include <webp/decode.h>
-#include "desktop/plotters.h"
-#include "image/bitmap.h"
-#include "content/content_protected.h"
-#include "utils/log.h"
-#include "utils/messages.h"
-#include "utils/utils.h"
-
-typedef struct webp_content
-{
- struct content base;
-
- struct bitmap *bitmap; /**< Created NetSurf bitmap */
-} webp_content;
-
-
-static nserror webp_create(const content_handler *handler,
- lwc_string *imime_type, const http_parameter *params,
- llcache_handle *llcache, const char *fallback_charset,
- bool quirks, struct content **c)
-{
- webp_content *webp;
- nserror error;
-
- webp = calloc(1, sizeof(webp_content));
- if (webp == NULL)
- return NSERROR_NOMEM;
-
- error = content__init(&webp->base, handler, imime_type, params,
- llcache, fallback_charset, quirks);
- if (error != NSERROR_OK) {
- free(webp);
- return error;
- }
-
- *c = (struct content *) webp;
-
- return NSERROR_OK;
-}
-
-/**
- * Convert a CONTENT_WEBP for display.
- *
- * No conversion is necessary. We merely read the WebP dimensions.
- */
-
-static bool webp_convert(struct content *c)
-{
- webp_content *webp = (webp_content *)c;
- union content_msg_data msg_data;
- const uint8_t *data;
- unsigned char *imagebuf = NULL;
- unsigned long size;
- int width = 0, height = 0;
- char *title;
- int res = 0;
- uint8_t *res_p = NULL;
-
- data = (uint8_t *)content__get_source_data(c, &size);
-
- res = WebPGetInfo(data, size, &width, &height);
- if (res == 0) {
- msg_data.error = messages_get("NoMemory");
- content_broadcast(c, CONTENT_MSG_ERROR, msg_data);
- return false;
- }
-
- webp->bitmap = bitmap_create(width, height, BITMAP_NEW | BITMAP_OPAQUE);
- if (!webp->bitmap) {
- msg_data.error = messages_get("NoMemory");
- content_broadcast(c, CONTENT_MSG_ERROR, msg_data);
- return false;
- }
-
- imagebuf = bitmap_get_buffer(webp->bitmap);
- if (!imagebuf) {
- msg_data.error = messages_get("NoMemory");
- content_broadcast(c, CONTENT_MSG_ERROR, msg_data);
- return false;
- }
- unsigned int row_width = bitmap_get_rowstride(webp->bitmap);
-
- res_p = WebPDecodeRGBAInto(data, size, imagebuf,
- row_width * height, row_width);
- if (res_p == NULL) {
- msg_data.error = messages_get("NoMemory");
- content_broadcast(c, CONTENT_MSG_ERROR, msg_data);
- return false;
- }
-
- c->width = width;
- c->height = height;
-
- /* set title */
- title = messages_get_buff("WebPTitle",
- nsurl_access_leaf(llcache_handle_get_url(c->llcache)),
- c->width, c->height);
- if (title != NULL) {
- content__set_title(c, title);
- free(title);
- }
-
- bitmap_modified(webp->bitmap);
-
- content_set_ready(c);
- content_set_done(c);
-
- content_set_status(c, "");
- return true;
-}
-
-
-/**
- * Destroy a CONTENT_WEBP and free all resources it owns.
- */
-
-static void webp_destroy(struct content *c)
-{
- webp_content *webp = (webp_content *)c;
-
- if (webp->bitmap != NULL)
- bitmap_destroy(webp->bitmap);
-}
-
-
-/**
- * Redraw a CONTENT_WEBP.
- */
-
-static bool webp_redraw(struct content *c, struct content_redraw_data *data,
- const struct rect *clip, const struct redraw_context *ctx)
-{
- webp_content *webp = (webp_content *)c;
- bitmap_flags_t flags = BITMAPF_NONE;
-
- if (data->repeat_x)
- flags |= BITMAPF_REPEAT_X;
- if (data->repeat_y)
- flags |= BITMAPF_REPEAT_Y;
-
- return ctx->plot->bitmap(data->x, data->y, data->width, data->height,
- webp->bitmap, data->background_colour, flags);
-}
-
-
-static nserror webp_clone(const struct content *old, struct content **newc)
-{
- webp_content *webp;
- nserror error;
-
- webp = calloc(1, sizeof(webp_content));
- if (webp == NULL)
- return NSERROR_NOMEM;
-
- error = content__clone(old, &webp->base);
- if (error != NSERROR_OK) {
- content_destroy(&webp->base);
- return error;
- }
-
- /* Simply replay convert */
- if (old->status == CONTENT_STATUS_READY ||
- old->status == CONTENT_STATUS_DONE) {
- if (webp_convert(&webp->base) == false) {
- content_destroy(&webp->base);
- return NSERROR_CLONE_FAILED;
- }
- }
-
- *newc = (struct content *) webp;
-
- return NSERROR_OK;
-}
-
-static void *webp_get_internal(const struct content *c, void *context)
-{
- webp_content *webp = (webp_content *)c;
-
- return webp->bitmap;
-}
-
-static content_type webp_content_type(void)
-{
- return CONTENT_IMAGE;
-}
-
-static const content_handler webp_content_handler = {
- .create = webp_create,
- .data_complete = webp_convert,
- .destroy = webp_destroy,
- .redraw = webp_redraw,
- .clone = webp_clone,
- .get_internal = webp_get_internal,
- .type = webp_content_type,
- .no_share = false,
-};
-
-static const char *webp_types[] = {
- "image/webp"
-};
-
-CONTENT_FACTORY_REGISTER_TYPES(webp, webp_types, webp_content_handler);
-
diff --git a/image/webp.h b/image/webp.h
deleted file mode 100644
index 0abfec8..0000000
--- a/image/webp.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2010 Chris Young <chris(a)unsatisfactorysoftware.co.uk>
- *
- * 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
- * Content for image/webp (libwebp interface).
- */
-
-#ifndef _NETSURF_WEBP_H_
-#define _NETSURF_WEBP_H_
-
-nserror webp_init(void);
-
-#endif
diff --git a/monkey/Makefile.target b/monkey/Makefile.target
index e07af90..cb7bf17 100644
--- a/monkey/Makefile.target
+++ b/monkey/Makefile.target
@@ -17,7 +17,6 @@ NETSURF_FEATURE_ROSPRITE_CFLAGS := -DWITH_NSSPRITE
NETSURF_FEATURE_BMP_CFLAGS := -DWITH_BMP
NETSURF_FEATURE_GIF_CFLAGS := -DWITH_GIF
NETSURF_FEATURE_PNG_CFLAGS := -DWITH_PNG
-NETSURF_FEATURE_WEBP_CFLAGS := -DWITH_WEBP
NETSURF_FEATURE_JS_CFLAGS := -DWITH_JS -DJS_HAS_FILE_OBJECT=0
NETSURF_FEATURE_MOZJS_CFLAGS := -DWITH_MOZJS -DJS_HAS_FILE_OBJECT=0
@@ -30,9 +29,6 @@ $(eval $(call pkg_config_find_and_add_enabled,PNG,libpng,PNG ))
$(eval $(call pkg_config_find_and_add_enabled,MOZJS,mozjs185,JavaScript))
$(eval $(call pkg_config_find_and_add_enabled,JS,mozilla-js,JavaScript))
-# no pkg-config for this library
-$(eval $(call feature_enabled,WEBP,-DWITH_WEBP,-lwebp -lvpx,WebP (libwebp)))
-
CWARNFLAGS += -Werror
CFLAGS += -std=c99 -Dmonkey -Dnsmonkey -g \
-----------------------------------------------------------------------
Summary of changes:
Makefile.defaults | 4 -
amiga/Makefile.defaults | 4 -
amiga/Makefile.target | 2 -
atari/Makefile.defaults | 4 -
cocoa/Makefile.defaults | 4 -
gtk/Makefile.target | 2 -
image/Makefile | 1 -
image/image.c | 7 --
image/webp.c | 229 -----------------------------------------------
image/webp.h | 28 ------
monkey/Makefile.target | 4 -
11 files changed, 289 deletions(-)
delete mode 100644 image/webp.c
delete mode 100644 image/webp.h
diff --git a/Makefile.defaults b/Makefile.defaults
index b8261ff..e2d7999 100644
--- a/Makefile.defaults
+++ b/Makefile.defaults
@@ -47,10 +47,6 @@ NETSURF_USE_JPEG := YES
# Valid options: YES, NO (highly recommended)
NETSURF_USE_PNG := YES
-# Enable NetSurf's use of libwebp for displaying WebPs
-# Valid options: YES, NO
-NETSURF_USE_WEBP := NO
-
# Enable NetSurf's use of gstreamer for displaying videos
# Valid options: YES, NO
NETSURF_USE_VIDEO := NO
diff --git a/amiga/Makefile.defaults b/amiga/Makefile.defaults
index cfd6a76..0674a9d 100644
--- a/amiga/Makefile.defaults
+++ b/amiga/Makefile.defaults
@@ -14,10 +14,6 @@ endif
# Valid options: YES, NO, AUTO
NETSURF_USE_ROSPRITE := NO
-# Enable NetSurf's use of libwebp for displaying WebPs
-# Valid options: YES, NO
-NETSURF_USE_WEBP := NO
-
# Enable NetSurf to display Amiga icons
# Valid options: YES, NO (recommended)
NETSURF_USE_AMIGA_ICON := YES
diff --git a/amiga/Makefile.target b/amiga/Makefile.target
index 10e759b..5c7bc3b 100644
--- a/amiga/Makefile.target
+++ b/amiga/Makefile.target
@@ -14,7 +14,6 @@ NETSURF_FEATURE_ROSPRITE_CFLAGS := -DWITH_NSSPRITE
NETSURF_FEATURE_BMP_CFLAGS := -DWITH_BMP
NETSURF_FEATURE_GIF_CFLAGS := -DWITH_GIF
NETSURF_FEATURE_PNG_CFLAGS := -DWITH_PNG
-NETSURF_FEATURE_WEBP_CFLAGS := -DWITH_WEBP
NETSURF_FEATURE_NSSVG_CFLAGS := -DWITH_NS_SVG
NETSURF_FEATURE_VIDEO_CFLAGS := -DWITH_VIDEO
@@ -24,7 +23,6 @@ ifeq ($(HOST),amiga)
$(eval $(call feature_enabled,GIF,-DWITH_GIF,-lnsgif,GIF (libnsgif)))
$(eval $(call feature_enabled,PNG,-DWITH_PNG,-lpng,PNG (libpng) ))
$(eval $(call feature_enabled,NSSVG,-DWITH_NS_SVG,-lsvgtiny,SVG (libsvgtiny)))
- $(eval $(call feature_enabled,WEBP,-DWITH_WEBP,-lwebp,WebP (libwebp)))
$(eval $(call feature_enabled,VIDEO,-DWITH_VIDEO -I /SDK/local/newlib/include/glib-2.0,-lgstreamer-0.10 -lglib-2.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lintl -lffi,Video (libgstreamer)))
$(eval $(call feature_enabled,JS,-DXP_UNIX -DWITH_JS -DJS_VERSION=185,-lstdc++ -lmozjs185,JavaScript))
$(eval $(call feature_enabled,MOZJS,-DXP_AMIGA -DWITH_MOZJS -DJS_VERSION=170 -DJSVERSION_LATEST=170 -DJSOPTION_JIT=0 -DJSCLASS_GLOBAL_FLAGS=0,-ljs -lfdlibm,JavaScript))
diff --git a/atari/Makefile.defaults b/atari/Makefile.defaults
index 211c8e6..b738b48 100644
--- a/atari/Makefile.defaults
+++ b/atari/Makefile.defaults
@@ -10,10 +10,6 @@ NETSURF_USE_LIBICONV_PLUG := NO
# Valid options: YES, NO, AUTO
NETSURF_USE_ROSPRITE := NO
-# Enable NetSurf's use of libwebp for displaying WebPs
-# Valid options: YES, NO
-NETSURF_USE_WEBP := NO
-
# Enable NetSurf's use of librsvg in conjunction with Cairo to display SVGs
# Valid options: YES, NO, AUTO
NETSURF_USE_RSVG := AUTO
diff --git a/cocoa/Makefile.defaults b/cocoa/Makefile.defaults
index 50da667..17c5df9 100644
--- a/cocoa/Makefile.defaults
+++ b/cocoa/Makefile.defaults
@@ -10,10 +10,6 @@ NETSURF_USE_LIBICONV_PLUG := NO
# Valid options: YES, NO, AUTO
NETSURF_USE_ROSPRITE := NO
-# Enable NetSurf's use of libwebp for displaying WebPs
-# Valid options: YES, NO
-NETSURF_USE_WEBP := NO
-
# Enable NetSurf's use of librsvg in conjunction with Cairo to display SVGs
# Valid options: YES, NO, AUTO
NETSURF_USE_RSVG := AUTO
diff --git a/gtk/Makefile.target b/gtk/Makefile.target
index d03f4f9..8378c10 100644
--- a/gtk/Makefile.target
+++ b/gtk/Makefile.target
@@ -14,7 +14,6 @@ NETSURF_FEATURE_ROSPRITE_CFLAGS := -DWITH_NSSPRITE
NETSURF_FEATURE_BMP_CFLAGS := -DWITH_BMP
NETSURF_FEATURE_GIF_CFLAGS := -DWITH_GIF
NETSURF_FEATURE_PNG_CFLAGS := -DWITH_PNG
-NETSURF_FEATURE_WEBP_CFLAGS := -DWITH_WEBP
NETSURF_FEATURE_JS_CFLAGS := -DWITH_JS -DJS_HAS_FILE_OBJECT=0
NETSURF_FEATURE_MOZJS_CFLAGS := -DWITH_MOZJS -DJS_HAS_FILE_OBJECT=0
NETSURF_FEATURE_VIDEO_CFLAGS := -DWITH_VIDEO
@@ -27,7 +26,6 @@ $(eval $(call pkg_config_find_and_add_enabled,GIF,libnsgif,GIF))
$(eval $(call pkg_config_find_and_add_enabled,RSVG,librsvg-2.0,SVG))
$(eval $(call pkg_config_find_and_add_enabled,NSSVG,libsvgtiny,SVG))
$(eval $(call pkg_config_find_and_add_enabled,ROSPRITE,librosprite,Sprite))
-$(eval $(call feature_enabled,WEBP,-DWITH_WEBP,-lwebp,WebP (libwebp)))
$(eval $(call pkg_config_find_and_add_enabled,MOZJS,mozjs185,JavaScript))
$(eval $(call pkg_config_find_and_add_enabled,JS,mozilla-js,JavaScript))
$(eval $(call pkg_config_find_and_add_enabled,VIDEO,gstreamer-0.10,Video))
diff --git a/image/Makefile b/image/Makefile
index 9992c54..5851a1c 100644
--- a/image/Makefile
+++ b/image/Makefile
@@ -10,7 +10,6 @@ S_IMAGE_$(NETSURF_USE_ROSPRITE) += nssprite.c
S_IMAGE_$(NETSURF_USE_PNG) += png.c
S_IMAGE_$(NETSURF_USE_NSSVG) += svg.c
S_IMAGE_$(NETSURF_USE_RSVG) += rsvg.c
-S_IMAGE_$(NETSURF_USE_WEBP) += webp.c
S_IMAGE_$(NETSURF_USE_VIDEO) += video.c
S_IMAGE := $(addprefix image/,$(S_IMAGE_YES))
diff --git a/image/image.c b/image/image.c
index 339f775..49dc2b8 100644
--- a/image/image.c
+++ b/image/image.c
@@ -34,7 +34,6 @@
#include "image/png.h"
#include "image/rsvg.h"
#include "image/svg.h"
-#include "image/webp.h"
#include "image/image.h"
/**
@@ -94,12 +93,6 @@ nserror image_init(void)
return error;
#endif
-#ifdef WITH_WEBP
- error = webp_init();
- if (error != NSERROR_OK)
- return error;
-#endif /* WITH_WEBP */
-
return NSERROR_OK;
}
diff --git a/image/webp.c b/image/webp.c
deleted file mode 100644
index fc4356c..0000000
--- a/image/webp.c
+++ /dev/null
@@ -1,229 +0,0 @@
- /*
- * Copyright 2010 Chris Young <chris(a)unsatisfactorysoftware.co.uk>
- *
- * 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
- * Content for image/webp (libwebp implementation).
- *
- */
-
-#include <assert.h>
-#include <string.h>
-#include <stdlib.h>
-#include <webp/decode.h>
-#include "desktop/plotters.h"
-#include "image/bitmap.h"
-#include "content/content_protected.h"
-#include "utils/log.h"
-#include "utils/messages.h"
-#include "utils/utils.h"
-
-typedef struct webp_content
-{
- struct content base;
-
- struct bitmap *bitmap; /**< Created NetSurf bitmap */
-} webp_content;
-
-
-static nserror webp_create(const content_handler *handler,
- lwc_string *imime_type, const http_parameter *params,
- llcache_handle *llcache, const char *fallback_charset,
- bool quirks, struct content **c)
-{
- webp_content *webp;
- nserror error;
-
- webp = calloc(1, sizeof(webp_content));
- if (webp == NULL)
- return NSERROR_NOMEM;
-
- error = content__init(&webp->base, handler, imime_type, params,
- llcache, fallback_charset, quirks);
- if (error != NSERROR_OK) {
- free(webp);
- return error;
- }
-
- *c = (struct content *) webp;
-
- return NSERROR_OK;
-}
-
-/**
- * Convert a CONTENT_WEBP for display.
- *
- * No conversion is necessary. We merely read the WebP dimensions.
- */
-
-static bool webp_convert(struct content *c)
-{
- webp_content *webp = (webp_content *)c;
- union content_msg_data msg_data;
- const uint8_t *data;
- unsigned char *imagebuf = NULL;
- unsigned long size;
- int width = 0, height = 0;
- char *title;
- int res = 0;
- uint8_t *res_p = NULL;
-
- data = (uint8_t *)content__get_source_data(c, &size);
-
- res = WebPGetInfo(data, size, &width, &height);
- if (res == 0) {
- msg_data.error = messages_get("NoMemory");
- content_broadcast(c, CONTENT_MSG_ERROR, msg_data);
- return false;
- }
-
- webp->bitmap = bitmap_create(width, height, BITMAP_NEW | BITMAP_OPAQUE);
- if (!webp->bitmap) {
- msg_data.error = messages_get("NoMemory");
- content_broadcast(c, CONTENT_MSG_ERROR, msg_data);
- return false;
- }
-
- imagebuf = bitmap_get_buffer(webp->bitmap);
- if (!imagebuf) {
- msg_data.error = messages_get("NoMemory");
- content_broadcast(c, CONTENT_MSG_ERROR, msg_data);
- return false;
- }
- unsigned int row_width = bitmap_get_rowstride(webp->bitmap);
-
- res_p = WebPDecodeRGBAInto(data, size, imagebuf,
- row_width * height, row_width);
- if (res_p == NULL) {
- msg_data.error = messages_get("NoMemory");
- content_broadcast(c, CONTENT_MSG_ERROR, msg_data);
- return false;
- }
-
- c->width = width;
- c->height = height;
-
- /* set title */
- title = messages_get_buff("WebPTitle",
- nsurl_access_leaf(llcache_handle_get_url(c->llcache)),
- c->width, c->height);
- if (title != NULL) {
- content__set_title(c, title);
- free(title);
- }
-
- bitmap_modified(webp->bitmap);
-
- content_set_ready(c);
- content_set_done(c);
-
- content_set_status(c, "");
- return true;
-}
-
-
-/**
- * Destroy a CONTENT_WEBP and free all resources it owns.
- */
-
-static void webp_destroy(struct content *c)
-{
- webp_content *webp = (webp_content *)c;
-
- if (webp->bitmap != NULL)
- bitmap_destroy(webp->bitmap);
-}
-
-
-/**
- * Redraw a CONTENT_WEBP.
- */
-
-static bool webp_redraw(struct content *c, struct content_redraw_data *data,
- const struct rect *clip, const struct redraw_context *ctx)
-{
- webp_content *webp = (webp_content *)c;
- bitmap_flags_t flags = BITMAPF_NONE;
-
- if (data->repeat_x)
- flags |= BITMAPF_REPEAT_X;
- if (data->repeat_y)
- flags |= BITMAPF_REPEAT_Y;
-
- return ctx->plot->bitmap(data->x, data->y, data->width, data->height,
- webp->bitmap, data->background_colour, flags);
-}
-
-
-static nserror webp_clone(const struct content *old, struct content **newc)
-{
- webp_content *webp;
- nserror error;
-
- webp = calloc(1, sizeof(webp_content));
- if (webp == NULL)
- return NSERROR_NOMEM;
-
- error = content__clone(old, &webp->base);
- if (error != NSERROR_OK) {
- content_destroy(&webp->base);
- return error;
- }
-
- /* Simply replay convert */
- if (old->status == CONTENT_STATUS_READY ||
- old->status == CONTENT_STATUS_DONE) {
- if (webp_convert(&webp->base) == false) {
- content_destroy(&webp->base);
- return NSERROR_CLONE_FAILED;
- }
- }
-
- *newc = (struct content *) webp;
-
- return NSERROR_OK;
-}
-
-static void *webp_get_internal(const struct content *c, void *context)
-{
- webp_content *webp = (webp_content *)c;
-
- return webp->bitmap;
-}
-
-static content_type webp_content_type(void)
-{
- return CONTENT_IMAGE;
-}
-
-static const content_handler webp_content_handler = {
- .create = webp_create,
- .data_complete = webp_convert,
- .destroy = webp_destroy,
- .redraw = webp_redraw,
- .clone = webp_clone,
- .get_internal = webp_get_internal,
- .type = webp_content_type,
- .no_share = false,
-};
-
-static const char *webp_types[] = {
- "image/webp"
-};
-
-CONTENT_FACTORY_REGISTER_TYPES(webp, webp_types, webp_content_handler);
-
diff --git a/image/webp.h b/image/webp.h
deleted file mode 100644
index 0abfec8..0000000
--- a/image/webp.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2010 Chris Young <chris(a)unsatisfactorysoftware.co.uk>
- *
- * 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
- * Content for image/webp (libwebp interface).
- */
-
-#ifndef _NETSURF_WEBP_H_
-#define _NETSURF_WEBP_H_
-
-nserror webp_init(void);
-
-#endif
diff --git a/monkey/Makefile.target b/monkey/Makefile.target
index e07af90..cb7bf17 100644
--- a/monkey/Makefile.target
+++ b/monkey/Makefile.target
@@ -17,7 +17,6 @@ NETSURF_FEATURE_ROSPRITE_CFLAGS := -DWITH_NSSPRITE
NETSURF_FEATURE_BMP_CFLAGS := -DWITH_BMP
NETSURF_FEATURE_GIF_CFLAGS := -DWITH_GIF
NETSURF_FEATURE_PNG_CFLAGS := -DWITH_PNG
-NETSURF_FEATURE_WEBP_CFLAGS := -DWITH_WEBP
NETSURF_FEATURE_JS_CFLAGS := -DWITH_JS -DJS_HAS_FILE_OBJECT=0
NETSURF_FEATURE_MOZJS_CFLAGS := -DWITH_MOZJS -DJS_HAS_FILE_OBJECT=0
@@ -30,9 +29,6 @@ $(eval $(call pkg_config_find_and_add_enabled,PNG,libpng,PNG ))
$(eval $(call pkg_config_find_and_add_enabled,MOZJS,mozjs185,JavaScript))
$(eval $(call pkg_config_find_and_add_enabled,JS,mozilla-js,JavaScript))
-# no pkg-config for this library
-$(eval $(call feature_enabled,WEBP,-DWITH_WEBP,-lwebp -lvpx,WebP (libwebp)))
-
CWARNFLAGS += -Werror
CFLAGS += -std=c99 -Dmonkey -Dnsmonkey -g \
--
NetSurf Browser
8 years, 1 month
netsurf: branch master updated. release/3.3-98-geab53da
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/eab53da088c1644924321...
...commit http://git.netsurf-browser.org/netsurf.git/commit/eab53da088c16449243218a...
...tree http://git.netsurf-browser.org/netsurf.git/tree/eab53da088c16449243218a52...
The branch, master has been updated
via eab53da088c16449243218a527ba142a9677d93d (commit)
from 1c9c303df886c073970982b78b2308f180f9cb9d (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=eab53da088c16449243...
commit eab53da088c16449243218a527ba142a9677d93d
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
Remove unecessary inclusion of the image bitmap header
diff --git a/gtk/thumbnail.c b/gtk/thumbnail.c
index ef95d0c..2ee33fb 100644
--- a/gtk/thumbnail.c
+++ b/gtk/thumbnail.c
@@ -35,7 +35,6 @@
#include "desktop/plotters.h"
#include "desktop/browser.h"
#include "desktop/thumbnail.h"
-#include "image/bitmap.h"
#include "gtk/scaffolding.h"
#include "gtk/plotters.h"
diff --git a/image/bmp.h b/image/bmp.h
index 9c016ec..f3b3985 100644
--- a/image/bmp.h
+++ b/image/bmp.h
@@ -26,8 +26,6 @@
#include <libnsbmp.h>
-#include "image/bitmap.h"
-
extern bmp_bitmap_callback_vt bmp_bitmap_callbacks; /** Only to be used by ICO code. */
nserror nsbmp_init(void);
diff --git a/image/image_cache.c b/image/image_cache.c
index ac36790..cf15bf7 100644
--- a/image/image_cache.c
+++ b/image/image_cache.c
@@ -27,6 +27,7 @@
#include "desktop/gui_misc.h"
#include "desktop/gui_internal.h"
+#include "image/bitmap.h"
#include "image/image_cache.h"
#include "image/image.h"
diff --git a/image/image_cache.h b/image/image_cache.h
index eb7a04f..2f1a5ca 100644
--- a/image/image_cache.h
+++ b/image/image_cache.h
@@ -38,10 +38,9 @@
#define NETSURF_IMAGE_IMAGE_CACHE_H_
#include "utils/errors.h"
-#include "desktop/plotters.h"
-#include "image/bitmap.h"
struct content_redraw_data;
+struct redraw_context;
typedef struct bitmap * (image_cache_convert_fn) (struct content *content);
-----------------------------------------------------------------------
Summary of changes:
gtk/thumbnail.c | 1 -
image/bmp.h | 2 --
image/image_cache.c | 1 +
image/image_cache.h | 3 +--
4 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/gtk/thumbnail.c b/gtk/thumbnail.c
index ef95d0c..2ee33fb 100644
--- a/gtk/thumbnail.c
+++ b/gtk/thumbnail.c
@@ -35,7 +35,6 @@
#include "desktop/plotters.h"
#include "desktop/browser.h"
#include "desktop/thumbnail.h"
-#include "image/bitmap.h"
#include "gtk/scaffolding.h"
#include "gtk/plotters.h"
diff --git a/image/bmp.h b/image/bmp.h
index 9c016ec..f3b3985 100644
--- a/image/bmp.h
+++ b/image/bmp.h
@@ -26,8 +26,6 @@
#include <libnsbmp.h>
-#include "image/bitmap.h"
-
extern bmp_bitmap_callback_vt bmp_bitmap_callbacks; /** Only to be used by ICO code. */
nserror nsbmp_init(void);
diff --git a/image/image_cache.c b/image/image_cache.c
index ac36790..cf15bf7 100644
--- a/image/image_cache.c
+++ b/image/image_cache.c
@@ -27,6 +27,7 @@
#include "desktop/gui_misc.h"
#include "desktop/gui_internal.h"
+#include "image/bitmap.h"
#include "image/image_cache.h"
#include "image/image.h"
diff --git a/image/image_cache.h b/image/image_cache.h
index eb7a04f..2f1a5ca 100644
--- a/image/image_cache.h
+++ b/image/image_cache.h
@@ -38,10 +38,9 @@
#define NETSURF_IMAGE_IMAGE_CACHE_H_
#include "utils/errors.h"
-#include "desktop/plotters.h"
-#include "image/bitmap.h"
struct content_redraw_data;
+struct redraw_context;
typedef struct bitmap * (image_cache_convert_fn) (struct content *content);
--
NetSurf Browser
8 years, 1 month
netsurf: branch master updated. release/3.3-97-g1c9c303
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/1c9c303df886c07397098...
...commit http://git.netsurf-browser.org/netsurf.git/commit/1c9c303df886c073970982b...
...tree http://git.netsurf-browser.org/netsurf.git/tree/1c9c303df886c073970982b78...
The branch, master has been updated
via 1c9c303df886c073970982b78b2308f180f9cb9d (commit)
from 1c3211c50fa189249968d6d69eade889c9fd2069 (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=1c9c303df886c073970...
commit 1c9c303df886c073970982b78b2308f180f9cb9d
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
rationalise atari plotters header usage.
diff --git a/atari/bitmap.c b/atari/bitmap.c
index 52e515f..72e5a20 100755
--- a/atari/bitmap.c
+++ b/atari/bitmap.c
@@ -19,7 +19,8 @@
#include <inttypes.h>
#include <sys/types.h>
#include <string.h>
-#include "assert.h"
+#include <assert.h>
+#include <stdlib.h>
#include "utils/nsoption.h"
#include "utils/log.h"
diff --git a/atari/font.c b/atari/font.c
index ff1c3e7..6b3cc6f 100755
--- a/atari/font.c
+++ b/atari/font.c
@@ -46,11 +46,10 @@
#include "desktop/plotters.h"
#include "atari/gui.h"
-#include "atari/font.h"
+#include "atari/plot/fontplot.h"
#include "atari/plot/plot.h"
#include "atari/findfile.h"
-#include "atari/gui.h"
-#include "atari/plot/plot.h"
+#include "atari/font.h"
extern FONT_PLOTTER fplotter;
diff --git a/atari/gui.h b/atari/gui.h
index 4c22429..ed76adc 100755
--- a/atari/gui.h
+++ b/atari/gui.h
@@ -25,6 +25,10 @@
#include "atari/redrawslots.h"
#include "atari/gemtk/gemtk.h"
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+
#define CARET_STATE_VISIBLE 0x01
#define CARET_STATE_ENABLED 0x02
diff --git a/atari/plot/font_freetype.c b/atari/plot/font_freetype.c
index c4d7748..6b22ba8 100755
--- a/atari/plot/font_freetype.c
+++ b/atari/plot/font_freetype.c
@@ -18,16 +18,22 @@
*/
#ifdef WITH_FREETYPE_FONT_DRIVER
-
+#include <assert.h>
#include <ft2build.h>
#include FT_CACHE_H
+#include "utils/log.h"
#include "utils/nsoption.h"
#include "desktop/mouse.h"
+#include "desktop/plot_style.h"
+#include "atari/gui.h"
+#include "atari/bitmap.h"
#include "atari/plot/plot.h"
+#include "atari/plot/fontplot.h"
#include "atari/plot/font_freetype.h"
#include "atari/findfile.h"
+#include "atari/gemtk/gemtk.h"
/* -------------------------------------------------------------------------- */
/* Font Loading & Mapping scheme */
diff --git a/atari/plot/font_internal.c b/atari/plot/font_internal.c
index 427444d..bfe0def 100644
--- a/atari/plot/font_internal.c
+++ b/atari/plot/font_internal.c
@@ -21,10 +21,13 @@
#include <unistd.h>
-#include "utils/utf8.h"
-#include "utils/log.h"
+#include "utils/utf8.h"
+#include "utils/log.h"
#include "desktop/mouse.h"
+#include "desktop/plot_style.h"
+#include "atari/gui.h"
+#include "atari/bitmap.h"
#include "atari/plot/plot.h"
#include "atari/plot/fontplot.h"
#include "atari/plot/font_internal.h"
diff --git a/atari/plot/fontplot.c b/atari/plot/fontplot.c
index 97f3503..9f0edd9 100644
--- a/atari/plot/fontplot.c
+++ b/atari/plot/fontplot.c
@@ -16,8 +16,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <stdbool.h>
+#include <assert.h>
+#include <stdlib.h>
+#include <mt_gem.h>
+
#include "desktop/mouse.h"
+#include "desktop/plot_style.h"
+#include "atari/bitmap.h"
#include "atari/plot/fontplot.h"
const struct s_font_driver_table_entry font_driver_table[] =
diff --git a/atari/plot/fontplot.h b/atari/plot/fontplot.h
index eab35cb..27524fd 100644
--- a/atari/plot/fontplot.h
+++ b/atari/plot/fontplot.h
@@ -1,22 +1,6 @@
#ifndef FONT_PLOT_H
#define FONT_PLOT_H
-#include <stdlib.h>
-#include <stdbool.h>
-#include <stdio.h>
-#include <math.h>
-#include <assert.h>
-#include <string.h>
-
-#include "desktop/plot_style.h"
-#include "image/bitmap.h"
-#include "utils/log.h"
-#include "atari/bitmap.h"
-#include "atari/plot/eddi.h"
-#include "atari/gui.h"
-#include "atari/misc.h"
-#include "atari/osspec.h"
-
typedef struct s_font_plotter * FONT_PLOTTER;
struct s_font_driver_table_entry
diff --git a/atari/plot/plot.c b/atari/plot/plot.c
index 523ce44..583429a 100755
--- a/atari/plot/plot.c
+++ b/atari/plot/plot.c
@@ -22,8 +22,8 @@
#include <limits.h>
#include <math.h>
#include <stdbool.h>
-
#include <mt_gem.h>
+#include <mint/osbind.h>
#include "image/bitmap.h"
#include "utils/log.h"
@@ -32,9 +32,12 @@
#include "desktop/plotters.h"
#include "desktop/mouse.h"
+#include "atari/osspec.h"
#include "atari/misc.h"
#include "atari/bitmap.h"
#include "utils/nsoption.h"
+#include "atari/plot/eddi.h"
+#include "atari/plot/fontplot.h"
#include "atari/plot/plot.h"
void vq_scrninfo(VdiHdl handle, short *work_out);
diff --git a/atari/plot/plot.h b/atari/plot/plot.h
index 00546e8..22f8781 100755
--- a/atari/plot/plot.h
+++ b/atari/plot/plot.h
@@ -19,40 +19,23 @@
#ifndef NS_ATARI_PLOT_H
#define NS_ATARI_PLOT_H
-#include <stdlib.h>
-#include <stdbool.h>
-#include <stdio.h>
-#include <string.h>
-#include <math.h>
-#include <assert.h>
-#include <mint/osbind.h>
-#include <mint/cookie.h>
-#include <Hermes/Hermes.h>
-
-#include "desktop/plotters.h"
-#include "desktop/plot_style.h"
-#include "image/bitmap.h"
-
-#include "atari/bitmap.h"
-#include "atari/plot/eddi.h"
-#include "atari/plot/fontplot.h"
-
-/* how much memory should be kept allocated for temp. conversion bitmaps: */
+/** how much memory should be kept allocated for temp. conversion bitmaps: */
#define CONV_KEEP_LIMIT 512000
-/* how much memory to allocate if some is needed: */
+
+/** how much memory to allocate if some is needed: */
#define CONV_BLOCK_SIZE 32000
/* Plotter Option Flags: */
-#define PLOT_FLAG_DITHER 0x04 /* true if the plotter shall dither images */
-#define PLOT_FLAG_TRANS 0x08 /* true if the plotter supports transparent operations */
+#define PLOT_FLAG_DITHER 0x04 /**< set if the plotter shall dither images */
+#define PLOT_FLAG_TRANS 0x08 /**< set if the plotter supports transparent operations */
/* Plotter "feature" flags */
-#define PLOT_FLAG_HAS_DITHER 0x0400
-#define PLOT_FLAG_HAS_ALPHA 0x0800
-#define PLOT_FLAG_OFFSCREEN 0x1000 /* offsreen plotter should set this flag */
+#define PLOT_FLAG_HAS_DITHER 0x0400
+#define PLOT_FLAG_HAS_ALPHA 0x0800
+#define PLOT_FLAG_OFFSCREEN 0x1000 /**< offscreen plotter should set this flag */
/* Plotter "internal" flags */
-#define PLOT_FLAG_LOCKED 0x08000 /* plotter should set this flag during screen updates */
+#define PLOT_FLAG_LOCKED 0x08000 /**< plotter should set this flag during screen updates */
/* Font Plotter flags: */
#define FONTPLOT_FLAG_MONOGLYPH 0x01
@@ -63,35 +46,35 @@
#define MFDB_FLAG_NOALLOC 0x04
/* Flags for blit functions: */
-#define BITMAPF_MONOGLYPH 4096 /* The bitmap is an character bitmap */
-#define BITMAPF_BUFFER_NATIVE 8192 /* Bitmap shall be kept converted */
+#define BITMAPF_MONOGLYPH 4096 /**< The bitmap is an character bitmap */
+#define BITMAPF_BUFFER_NATIVE 8192 /**< Bitmap shall be kept converted */
/* Error codes: */
#define ERR_BUFFERSIZE_EXCEEDS_SCREEN 1 /* The buffer allocated is larger than the screen */
-#define ERR_NO_MEM 2 /* Not enough memory for requested operation */
-#define ERR_PLOTTER_NOT_AVAILABLE 3 /* invalid plotter driver name passed */
+#define ERR_NO_MEM 2 /* Not enough memory for requested operation */
+#define ERR_PLOTTER_NOT_AVAILABLE 3 /* invalid plotter driver name passed */
struct s_vdi_sysinfo {
- short vdi_handle; /* vdi handle */
- short scr_w; /* resolution horz. */
- short scr_h; /* resolution vert. */
- short scr_bpp; /* bits per pixel */
- int colors; /* 0=hiclor, 2=mono */
- unsigned long hicolors; /* if colors = 0 */
- short pixelsize; /* bytes per pixel */
- unsigned short pitch; /* row pitch */
- unsigned short vdiformat; /* pixel format */
- unsigned short clut; /* type of clut support */
- void * screen; /* pointer to screen, or NULL */
- unsigned long screensize; /* size of screen (in bytes) */
- unsigned long mask_r; /* color masks */
- unsigned long mask_g;
- unsigned long mask_b;
- unsigned long mask_a;
- short maxintin; /* maximum pxy items */
- short maxpolycoords; /* max coords for p_line etc. */
- unsigned long EdDiVersion; /* EdDi Version or 0 */
- bool rasterscale; /* raster scaling support */
+ short vdi_handle; /**< vdi handle */
+ short scr_w; /**< resolution horz. */
+ short scr_h; /**< resolution vert. */
+ short scr_bpp; /**< bits per pixel */
+ int colors; /**< 0=hiclor, 2=mono */
+ unsigned long hicolors; /**< if colors = 0 */
+ short pixelsize; /**< bytes per pixel */
+ unsigned short pitch; /**< row pitch */
+ unsigned short vdiformat; /**< pixel format */
+ unsigned short clut; /**< type of clut support */
+ void *screen; /**< pointer to screen, or NULL */
+ unsigned long screensize; /**< size of screen (in bytes) */
+ unsigned long mask_r; /**< red color mask */
+ unsigned long mask_g; /**< green color mask */
+ unsigned long mask_b; /**< blue color mask */
+ unsigned long mask_a; /**< alpha color mask */
+ short maxintin; /* maximum pxy items */
+ short maxpolycoords; /* max coords for p_line etc. */
+ unsigned long EdDiVersion; /* EdDi Version or 0 */
+ bool rasterscale; /* raster scaling support */
};
struct rect;
@@ -100,7 +83,10 @@ extern const struct plotter_table atari_plotters;
int plot_init(char *);
int plot_finalise(void);
-/* translate an error number */
+
+/**
+ * translate an error number
+ */
const char* plot_err_str(int i) ;
bool plot_lock(void);
@@ -122,8 +108,7 @@ bool plot_rectangle( int x0, int y0, int x1, int y1,const plot_style_t *style );
bool plot_line( int x0, int y0, int x1, int y1, const plot_style_t *style );
bool plot_blit_bitmap(struct bitmap * bmp, int x, int y,
unsigned long bg, unsigned long flags);
-bool plot_blit_mfdb(GRECT * loc, MFDB * insrc, short fgcolor,
- uint32_t flags);
+bool plot_blit_mfdb(GRECT * loc, MFDB * insrc, short fgcolor, uint32_t flags);
bool plot_copy_rect(GRECT src, GRECT dst);
/* convert an vdi color to bgra */
@@ -135,23 +120,22 @@ void rgb_to_vdi1000( unsigned char * in, RGB1000 *out);
/* convert an rgb color to an index into the web palette */
short rgb_to_666_index(unsigned char r, unsigned char g, unsigned char b);
-/* assign vdi line style to dst ( netsurf type ) */
-#define NSLT2VDI(dst, src) \
- dst = 0;\
- switch( src->stroke_type ) {\
- case PLOT_OP_TYPE_DOT: \
- dst = (0xAAAA00 | 7);\
- break;\
- case PLOT_OP_TYPE_DASH:\
- dst = 3; \
- break;\
- case PLOT_OP_TYPE_SOLID:\
- case PLOT_OP_TYPE_NONE:\
- default:\
- dst = 1;\
- break;\
- }\
-
+/* assign vdi line style to dst ( netsurf type ) */
+#define NSLT2VDI(dst, src) \
+ dst = 0; \
+ switch( src->stroke_type ) { \
+ case PLOT_OP_TYPE_DOT: \
+ dst = (0xAAAA00 | 7); \
+ break; \
+ case PLOT_OP_TYPE_DASH: \
+ dst = 3; \
+ break; \
+ case PLOT_OP_TYPE_SOLID: \
+ case PLOT_OP_TYPE_NONE: \
+ default: \
+ dst = 1; \
+ break; \
+ }
#ifdef WITH_8BPP_SUPPORT
@@ -161,11 +145,14 @@ short rgb_to_666_index(unsigned char r, unsigned char g, unsigned char b);
#define OFFSET_WEB_PAL 16
#define OFFSET_CUST_PAL 232
#define RGB_TO_VDI(c) rgb_to_666_index( (c&0xFF),(c&0xFF00)>>8,(c&0xFF0000)>>16)+OFFSET_WEB_PAL
-#endif
+#endif /* WITH_8BPP_SUPPORT*/
+
+/* the name of this macro is crap - it should be named bgr_to_rgba ... or so */
+#define ABGR_TO_RGB(c) ( ((c&0xFF)<<16) | (c&0xFF00) | ((c&0xFF0000)>>16) ) << 8
-/* the name of this macro is crap - it should be named bgr_to_rgba ... or so */
-#define ABGR_TO_RGB(c) ( ((c&0xFF)<<16) | (c&0xFF00) | ((c&0xFF0000)>>16) ) << 8
-/* this index into the palette is used by the TC renderer to set current draw color: */
+/* this index into the palette is used by the TC renderer to set
+ * current draw color.
+ */
#define OFFSET_CUSTOM_COLOR 255
#endif
diff --git a/atari/rootwin.c b/atari/rootwin.c
index 66785aa..7b4cd03 100755
--- a/atari/rootwin.c
+++ b/atari/rootwin.c
@@ -60,6 +60,7 @@
#include "atari/redrawslots.h"
#include "atari/toolbar.h"
#include "atari/findfile.h"
+#include "atari/bitmap.h"
extern struct gui_window *input_window;
extern EVMULT_OUT aes_event_out;
diff --git a/atari/settings.c b/atari/settings.c
index 0378699..fe42f2a 100644
--- a/atari/settings.c
+++ b/atari/settings.c
@@ -11,7 +11,9 @@
#include <gem.h>
#include "utils/nsoption.h"
+#include "utils/log.h"
#include "desktop/plot_style.h"
+
#include "atari/res/netsurf.rsh"
#include "atari/settings.h"
#include "atari/deskmenu.h"
-----------------------------------------------------------------------
Summary of changes:
atari/bitmap.c | 3 +-
atari/font.c | 5 +-
atari/gui.h | 4 ++
atari/plot/font_freetype.c | 8 ++-
atari/plot/font_internal.c | 7 ++-
atari/plot/fontplot.c | 7 +++
atari/plot/fontplot.h | 16 ------
atari/plot/plot.c | 5 +-
atari/plot/plot.h | 135 ++++++++++++++++++++------------------------
atari/rootwin.c | 1 +
atari/settings.c | 2 +
11 files changed, 95 insertions(+), 98 deletions(-)
diff --git a/atari/bitmap.c b/atari/bitmap.c
index 52e515f..72e5a20 100755
--- a/atari/bitmap.c
+++ b/atari/bitmap.c
@@ -19,7 +19,8 @@
#include <inttypes.h>
#include <sys/types.h>
#include <string.h>
-#include "assert.h"
+#include <assert.h>
+#include <stdlib.h>
#include "utils/nsoption.h"
#include "utils/log.h"
diff --git a/atari/font.c b/atari/font.c
index ff1c3e7..6b3cc6f 100755
--- a/atari/font.c
+++ b/atari/font.c
@@ -46,11 +46,10 @@
#include "desktop/plotters.h"
#include "atari/gui.h"
-#include "atari/font.h"
+#include "atari/plot/fontplot.h"
#include "atari/plot/plot.h"
#include "atari/findfile.h"
-#include "atari/gui.h"
-#include "atari/plot/plot.h"
+#include "atari/font.h"
extern FONT_PLOTTER fplotter;
diff --git a/atari/gui.h b/atari/gui.h
index 4c22429..ed76adc 100755
--- a/atari/gui.h
+++ b/atari/gui.h
@@ -25,6 +25,10 @@
#include "atari/redrawslots.h"
#include "atari/gemtk/gemtk.h"
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+
#define CARET_STATE_VISIBLE 0x01
#define CARET_STATE_ENABLED 0x02
diff --git a/atari/plot/font_freetype.c b/atari/plot/font_freetype.c
index c4d7748..6b22ba8 100755
--- a/atari/plot/font_freetype.c
+++ b/atari/plot/font_freetype.c
@@ -18,16 +18,22 @@
*/
#ifdef WITH_FREETYPE_FONT_DRIVER
-
+#include <assert.h>
#include <ft2build.h>
#include FT_CACHE_H
+#include "utils/log.h"
#include "utils/nsoption.h"
#include "desktop/mouse.h"
+#include "desktop/plot_style.h"
+#include "atari/gui.h"
+#include "atari/bitmap.h"
#include "atari/plot/plot.h"
+#include "atari/plot/fontplot.h"
#include "atari/plot/font_freetype.h"
#include "atari/findfile.h"
+#include "atari/gemtk/gemtk.h"
/* -------------------------------------------------------------------------- */
/* Font Loading & Mapping scheme */
diff --git a/atari/plot/font_internal.c b/atari/plot/font_internal.c
index 427444d..bfe0def 100644
--- a/atari/plot/font_internal.c
+++ b/atari/plot/font_internal.c
@@ -21,10 +21,13 @@
#include <unistd.h>
-#include "utils/utf8.h"
-#include "utils/log.h"
+#include "utils/utf8.h"
+#include "utils/log.h"
#include "desktop/mouse.h"
+#include "desktop/plot_style.h"
+#include "atari/gui.h"
+#include "atari/bitmap.h"
#include "atari/plot/plot.h"
#include "atari/plot/fontplot.h"
#include "atari/plot/font_internal.h"
diff --git a/atari/plot/fontplot.c b/atari/plot/fontplot.c
index 97f3503..9f0edd9 100644
--- a/atari/plot/fontplot.c
+++ b/atari/plot/fontplot.c
@@ -16,8 +16,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <stdbool.h>
+#include <assert.h>
+#include <stdlib.h>
+#include <mt_gem.h>
+
#include "desktop/mouse.h"
+#include "desktop/plot_style.h"
+#include "atari/bitmap.h"
#include "atari/plot/fontplot.h"
const struct s_font_driver_table_entry font_driver_table[] =
diff --git a/atari/plot/fontplot.h b/atari/plot/fontplot.h
index eab35cb..27524fd 100644
--- a/atari/plot/fontplot.h
+++ b/atari/plot/fontplot.h
@@ -1,22 +1,6 @@
#ifndef FONT_PLOT_H
#define FONT_PLOT_H
-#include <stdlib.h>
-#include <stdbool.h>
-#include <stdio.h>
-#include <math.h>
-#include <assert.h>
-#include <string.h>
-
-#include "desktop/plot_style.h"
-#include "image/bitmap.h"
-#include "utils/log.h"
-#include "atari/bitmap.h"
-#include "atari/plot/eddi.h"
-#include "atari/gui.h"
-#include "atari/misc.h"
-#include "atari/osspec.h"
-
typedef struct s_font_plotter * FONT_PLOTTER;
struct s_font_driver_table_entry
diff --git a/atari/plot/plot.c b/atari/plot/plot.c
index 523ce44..583429a 100755
--- a/atari/plot/plot.c
+++ b/atari/plot/plot.c
@@ -22,8 +22,8 @@
#include <limits.h>
#include <math.h>
#include <stdbool.h>
-
#include <mt_gem.h>
+#include <mint/osbind.h>
#include "image/bitmap.h"
#include "utils/log.h"
@@ -32,9 +32,12 @@
#include "desktop/plotters.h"
#include "desktop/mouse.h"
+#include "atari/osspec.h"
#include "atari/misc.h"
#include "atari/bitmap.h"
#include "utils/nsoption.h"
+#include "atari/plot/eddi.h"
+#include "atari/plot/fontplot.h"
#include "atari/plot/plot.h"
void vq_scrninfo(VdiHdl handle, short *work_out);
diff --git a/atari/plot/plot.h b/atari/plot/plot.h
index 00546e8..22f8781 100755
--- a/atari/plot/plot.h
+++ b/atari/plot/plot.h
@@ -19,40 +19,23 @@
#ifndef NS_ATARI_PLOT_H
#define NS_ATARI_PLOT_H
-#include <stdlib.h>
-#include <stdbool.h>
-#include <stdio.h>
-#include <string.h>
-#include <math.h>
-#include <assert.h>
-#include <mint/osbind.h>
-#include <mint/cookie.h>
-#include <Hermes/Hermes.h>
-
-#include "desktop/plotters.h"
-#include "desktop/plot_style.h"
-#include "image/bitmap.h"
-
-#include "atari/bitmap.h"
-#include "atari/plot/eddi.h"
-#include "atari/plot/fontplot.h"
-
-/* how much memory should be kept allocated for temp. conversion bitmaps: */
+/** how much memory should be kept allocated for temp. conversion bitmaps: */
#define CONV_KEEP_LIMIT 512000
-/* how much memory to allocate if some is needed: */
+
+/** how much memory to allocate if some is needed: */
#define CONV_BLOCK_SIZE 32000
/* Plotter Option Flags: */
-#define PLOT_FLAG_DITHER 0x04 /* true if the plotter shall dither images */
-#define PLOT_FLAG_TRANS 0x08 /* true if the plotter supports transparent operations */
+#define PLOT_FLAG_DITHER 0x04 /**< set if the plotter shall dither images */
+#define PLOT_FLAG_TRANS 0x08 /**< set if the plotter supports transparent operations */
/* Plotter "feature" flags */
-#define PLOT_FLAG_HAS_DITHER 0x0400
-#define PLOT_FLAG_HAS_ALPHA 0x0800
-#define PLOT_FLAG_OFFSCREEN 0x1000 /* offsreen plotter should set this flag */
+#define PLOT_FLAG_HAS_DITHER 0x0400
+#define PLOT_FLAG_HAS_ALPHA 0x0800
+#define PLOT_FLAG_OFFSCREEN 0x1000 /**< offscreen plotter should set this flag */
/* Plotter "internal" flags */
-#define PLOT_FLAG_LOCKED 0x08000 /* plotter should set this flag during screen updates */
+#define PLOT_FLAG_LOCKED 0x08000 /**< plotter should set this flag during screen updates */
/* Font Plotter flags: */
#define FONTPLOT_FLAG_MONOGLYPH 0x01
@@ -63,35 +46,35 @@
#define MFDB_FLAG_NOALLOC 0x04
/* Flags for blit functions: */
-#define BITMAPF_MONOGLYPH 4096 /* The bitmap is an character bitmap */
-#define BITMAPF_BUFFER_NATIVE 8192 /* Bitmap shall be kept converted */
+#define BITMAPF_MONOGLYPH 4096 /**< The bitmap is an character bitmap */
+#define BITMAPF_BUFFER_NATIVE 8192 /**< Bitmap shall be kept converted */
/* Error codes: */
#define ERR_BUFFERSIZE_EXCEEDS_SCREEN 1 /* The buffer allocated is larger than the screen */
-#define ERR_NO_MEM 2 /* Not enough memory for requested operation */
-#define ERR_PLOTTER_NOT_AVAILABLE 3 /* invalid plotter driver name passed */
+#define ERR_NO_MEM 2 /* Not enough memory for requested operation */
+#define ERR_PLOTTER_NOT_AVAILABLE 3 /* invalid plotter driver name passed */
struct s_vdi_sysinfo {
- short vdi_handle; /* vdi handle */
- short scr_w; /* resolution horz. */
- short scr_h; /* resolution vert. */
- short scr_bpp; /* bits per pixel */
- int colors; /* 0=hiclor, 2=mono */
- unsigned long hicolors; /* if colors = 0 */
- short pixelsize; /* bytes per pixel */
- unsigned short pitch; /* row pitch */
- unsigned short vdiformat; /* pixel format */
- unsigned short clut; /* type of clut support */
- void * screen; /* pointer to screen, or NULL */
- unsigned long screensize; /* size of screen (in bytes) */
- unsigned long mask_r; /* color masks */
- unsigned long mask_g;
- unsigned long mask_b;
- unsigned long mask_a;
- short maxintin; /* maximum pxy items */
- short maxpolycoords; /* max coords for p_line etc. */
- unsigned long EdDiVersion; /* EdDi Version or 0 */
- bool rasterscale; /* raster scaling support */
+ short vdi_handle; /**< vdi handle */
+ short scr_w; /**< resolution horz. */
+ short scr_h; /**< resolution vert. */
+ short scr_bpp; /**< bits per pixel */
+ int colors; /**< 0=hiclor, 2=mono */
+ unsigned long hicolors; /**< if colors = 0 */
+ short pixelsize; /**< bytes per pixel */
+ unsigned short pitch; /**< row pitch */
+ unsigned short vdiformat; /**< pixel format */
+ unsigned short clut; /**< type of clut support */
+ void *screen; /**< pointer to screen, or NULL */
+ unsigned long screensize; /**< size of screen (in bytes) */
+ unsigned long mask_r; /**< red color mask */
+ unsigned long mask_g; /**< green color mask */
+ unsigned long mask_b; /**< blue color mask */
+ unsigned long mask_a; /**< alpha color mask */
+ short maxintin; /* maximum pxy items */
+ short maxpolycoords; /* max coords for p_line etc. */
+ unsigned long EdDiVersion; /* EdDi Version or 0 */
+ bool rasterscale; /* raster scaling support */
};
struct rect;
@@ -100,7 +83,10 @@ extern const struct plotter_table atari_plotters;
int plot_init(char *);
int plot_finalise(void);
-/* translate an error number */
+
+/**
+ * translate an error number
+ */
const char* plot_err_str(int i) ;
bool plot_lock(void);
@@ -122,8 +108,7 @@ bool plot_rectangle( int x0, int y0, int x1, int y1,const plot_style_t *style );
bool plot_line( int x0, int y0, int x1, int y1, const plot_style_t *style );
bool plot_blit_bitmap(struct bitmap * bmp, int x, int y,
unsigned long bg, unsigned long flags);
-bool plot_blit_mfdb(GRECT * loc, MFDB * insrc, short fgcolor,
- uint32_t flags);
+bool plot_blit_mfdb(GRECT * loc, MFDB * insrc, short fgcolor, uint32_t flags);
bool plot_copy_rect(GRECT src, GRECT dst);
/* convert an vdi color to bgra */
@@ -135,23 +120,22 @@ void rgb_to_vdi1000( unsigned char * in, RGB1000 *out);
/* convert an rgb color to an index into the web palette */
short rgb_to_666_index(unsigned char r, unsigned char g, unsigned char b);
-/* assign vdi line style to dst ( netsurf type ) */
-#define NSLT2VDI(dst, src) \
- dst = 0;\
- switch( src->stroke_type ) {\
- case PLOT_OP_TYPE_DOT: \
- dst = (0xAAAA00 | 7);\
- break;\
- case PLOT_OP_TYPE_DASH:\
- dst = 3; \
- break;\
- case PLOT_OP_TYPE_SOLID:\
- case PLOT_OP_TYPE_NONE:\
- default:\
- dst = 1;\
- break;\
- }\
-
+/* assign vdi line style to dst ( netsurf type ) */
+#define NSLT2VDI(dst, src) \
+ dst = 0; \
+ switch( src->stroke_type ) { \
+ case PLOT_OP_TYPE_DOT: \
+ dst = (0xAAAA00 | 7); \
+ break; \
+ case PLOT_OP_TYPE_DASH: \
+ dst = 3; \
+ break; \
+ case PLOT_OP_TYPE_SOLID: \
+ case PLOT_OP_TYPE_NONE: \
+ default: \
+ dst = 1; \
+ break; \
+ }
#ifdef WITH_8BPP_SUPPORT
@@ -161,11 +145,14 @@ short rgb_to_666_index(unsigned char r, unsigned char g, unsigned char b);
#define OFFSET_WEB_PAL 16
#define OFFSET_CUST_PAL 232
#define RGB_TO_VDI(c) rgb_to_666_index( (c&0xFF),(c&0xFF00)>>8,(c&0xFF0000)>>16)+OFFSET_WEB_PAL
-#endif
+#endif /* WITH_8BPP_SUPPORT*/
+
+/* the name of this macro is crap - it should be named bgr_to_rgba ... or so */
+#define ABGR_TO_RGB(c) ( ((c&0xFF)<<16) | (c&0xFF00) | ((c&0xFF0000)>>16) ) << 8
-/* the name of this macro is crap - it should be named bgr_to_rgba ... or so */
-#define ABGR_TO_RGB(c) ( ((c&0xFF)<<16) | (c&0xFF00) | ((c&0xFF0000)>>16) ) << 8
-/* this index into the palette is used by the TC renderer to set current draw color: */
+/* this index into the palette is used by the TC renderer to set
+ * current draw color.
+ */
#define OFFSET_CUSTOM_COLOR 255
#endif
diff --git a/atari/rootwin.c b/atari/rootwin.c
index 66785aa..7b4cd03 100755
--- a/atari/rootwin.c
+++ b/atari/rootwin.c
@@ -60,6 +60,7 @@
#include "atari/redrawslots.h"
#include "atari/toolbar.h"
#include "atari/findfile.h"
+#include "atari/bitmap.h"
extern struct gui_window *input_window;
extern EVMULT_OUT aes_event_out;
diff --git a/atari/settings.c b/atari/settings.c
index 0378699..fe42f2a 100644
--- a/atari/settings.c
+++ b/atari/settings.c
@@ -11,7 +11,9 @@
#include <gem.h>
#include "utils/nsoption.h"
+#include "utils/log.h"
#include "desktop/plot_style.h"
+
#include "atari/res/netsurf.rsh"
#include "atari/settings.h"
#include "atari/deskmenu.h"
--
NetSurf Browser
8 years, 1 month
netsurf: branch master updated. release/3.3-96-g1c3211c
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/1c3211c50fa189249968d...
...commit http://git.netsurf-browser.org/netsurf.git/commit/1c3211c50fa189249968d6d...
...tree http://git.netsurf-browser.org/netsurf.git/tree/1c3211c50fa189249968d6d69...
The branch, master has been updated
via 1c3211c50fa189249968d6d69eade889c9fd2069 (commit)
from 2016628e8e20b64dbd9b980b8d11084e11c7cc3a (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=1c3211c50fa18924996...
commit 1c3211c50fa189249968d6d69eade889c9fd2069
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
remove unrequired includes from riscos thumbnail header
diff --git a/riscos/thumbnail.h b/riscos/thumbnail.h
index bea5876..4cd88bb 100644
--- a/riscos/thumbnail.h
+++ b/riscos/thumbnail.h
@@ -17,11 +17,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \file
- * Page thumbnail creation (interface).
+/**
+ * \file
+ * Page thumbnail creation interface.
*/
-#include "oslib/osspriteop.h"
-#include "image/bitmap.h"
+#ifndef _NETSURF_RISCOS_THUMBNAIL_H_
+#define _NETSURF_RISCOS_THUMBNAIL_H_
-osspriteop_area *thumbnail_convert_8bpp(struct bitmap *bitmap);
+struct osspriteop_area;
+
+struct osspriteop_area *thumbnail_convert_8bpp(struct bitmap *bitmap);
+
+#endif
diff --git a/riscos/window.c b/riscos/window.c
index 4f281b9..d15dd3c 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -63,6 +63,7 @@
#include "desktop/thumbnail.h"
#include "desktop/tree.h"
#include "desktop/gui_window.h"
+#include "image/bitmap.h"
#include "render/form.h"
#include "riscos/bitmap.h"
-----------------------------------------------------------------------
Summary of changes:
riscos/thumbnail.h | 15 ++++++++++-----
riscos/window.c | 1 +
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/riscos/thumbnail.h b/riscos/thumbnail.h
index bea5876..4cd88bb 100644
--- a/riscos/thumbnail.h
+++ b/riscos/thumbnail.h
@@ -17,11 +17,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \file
- * Page thumbnail creation (interface).
+/**
+ * \file
+ * Page thumbnail creation interface.
*/
-#include "oslib/osspriteop.h"
-#include "image/bitmap.h"
+#ifndef _NETSURF_RISCOS_THUMBNAIL_H_
+#define _NETSURF_RISCOS_THUMBNAIL_H_
-osspriteop_area *thumbnail_convert_8bpp(struct bitmap *bitmap);
+struct osspriteop_area;
+
+struct osspriteop_area *thumbnail_convert_8bpp(struct bitmap *bitmap);
+
+#endif
diff --git a/riscos/window.c b/riscos/window.c
index 4f281b9..d15dd3c 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -63,6 +63,7 @@
#include "desktop/thumbnail.h"
#include "desktop/tree.h"
#include "desktop/gui_window.h"
+#include "image/bitmap.h"
#include "render/form.h"
#include "riscos/bitmap.h"
--
NetSurf Browser
8 years, 1 month
netsurf: branch master updated. release/3.3-95-g2016628
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/2016628e8e20b64dbd9b9...
...commit http://git.netsurf-browser.org/netsurf.git/commit/2016628e8e20b64dbd9b980...
...tree http://git.netsurf-browser.org/netsurf.git/tree/2016628e8e20b64dbd9b980b8...
The branch, master has been updated
via 2016628e8e20b64dbd9b980b8d11084e11c7cc3a (commit)
from 8f41764268032d4286ede2d27f1bf106effc99f8 (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=2016628e8e20b64dbd9...
commit 2016628e8e20b64dbd9b980b8d11084e11c7cc3a
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
Improve bitmap operation table interface documentation.
diff --git a/image/bitmap.h b/image/bitmap.h
index 459a50a..b121f8a 100644
--- a/image/bitmap.h
+++ b/image/bitmap.h
@@ -16,17 +16,18 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \file
- * Generic bitmap handling (interface).
+/**
+ * \file
+ * Generic bitmap handling interface.
*
* This interface wraps the native platform-specific image format, so that
* portable image convertors can be written.
*
* Bitmaps are required to be 32bpp with components in the order RR GG BB AA.
- *
- * For example, an opaque 1x1 pixel image would yield the following bitmap
+ *
+ * For example, an opaque 1x1 pixel image would yield the following bitmap
* data:
- *
+ *
* Red : 0xff 0x00 0x00 0x00
* Green: 0x00 0xff 0x00 0x00
* Blue : 0x00 0x00 0xff 0x00
@@ -54,9 +55,9 @@
#define _NETSURF_IMAGE_BITMAP_H_
#define BITMAP_NEW 0
-#define BITMAP_OPAQUE (1 << 0) /** image is opaque */
-#define BITMAP_MODIFIED (1 << 1) /** buffer has been modified */
-#define BITMAP_CLEAR_MEMORY (1 << 2) /** memory should be wiped */
+#define BITMAP_OPAQUE (1 << 0) /**< image is opaque */
+#define BITMAP_MODIFIED (1 << 1) /**< buffer has been modified */
+#define BITMAP_CLEAR_MEMORY (1 << 2) /**< memory should be wiped */
struct content;
struct bitmap;
@@ -68,55 +69,98 @@ struct gui_bitmap_table {
/* Mandantory entries */
/**
- * Create a new bitmap
+ * Create a new bitmap.
+ *
+ * \param width width of image in pixels
+ * \param height width of image in pixels
+ * \param state The state to create the bitmap in.
+ * \return A bitmap structure or NULL on error.
*/
void *(*create)(int width, int height, unsigned int state);
/**
- * Destroy a bitmap
+ * Destroy a bitmap.
+ *
+ * \param bitmap The bitmap to destroy.
*/
void (*destroy)(void *bitmap);
/**
- * Set the opacity of a bitmap
+ * Set the opacity of a bitmap.
+ *
+ * \param bitmap The bitmap to set opacity on.
+ * \param opaque The bitmap opacity to set.
*/
void (*set_opaque)(void *bitmap, bool opaque);
/**
- * Get the opacity of a bitmap
+ * Get the opacity of a bitmap.
+ *
+ * \param bitmap The bitmap to examine.
+ * \return The bitmap opacity.
*/
bool (*get_opaque)(void *bitmap);
/**
+ * Test if a bitmap is opaque.
+ *
+ * \param bitmap The bitmap to examine.
+ * \return The bitmap opacity.
*/
bool (*test_opaque)(void *bitmap);
/**
+ * Get the image buffer from a bitmap
+ *
+ * \param bitmap The bitmap to get the buffer from.
+ * \return The image buffer or NULL if there is none.
*/
unsigned char *(*get_buffer)(void *bitmap);
/**
+ * Get the number of bytes per row of the image
+ *
+ * \param bitmap The bitmap
+ * \return The number of bytes for a row of the bitmap.
*/
size_t (*get_rowstride)(void *bitmap);
/**
+ * Get the bitmap width
+ *
+ * \param bitmap The bitmap
+ * \return The bitmap width in pixels.
*/
int (*get_width)(void *bitmap);
/**
+ * Get the bitmap height
+ *
+ * \param bitmap The bitmap
+ * \return The bitmap height in pixels.
*/
int (*get_height)(void *bitmap);
/**
+ * The the *bytes* per pixel.
+ *
+ * \param bitmap The bitmap
*/
size_t (*get_bpp)(void *bitmap);
/**
+ * Savde a bitmap to disc.
+ *
+ * \param bitmap The bitmap to save
+ * \param path The path to save the bitmap to.
+ * \param flags Flags affectin the save.
*/
bool (*save)(void *bitmap, const char *path, unsigned flags);
/**
* Marks a bitmap as modified.
+ *
+ * \param bitmap The bitmap set as modified.
*/
void (*modified)(void *bitmap);
};
-----------------------------------------------------------------------
Summary of changes:
image/bitmap.h | 68 ++++++++++++++++++++++++++++++++++++++++++++++----------
1 file changed, 56 insertions(+), 12 deletions(-)
diff --git a/image/bitmap.h b/image/bitmap.h
index 459a50a..b121f8a 100644
--- a/image/bitmap.h
+++ b/image/bitmap.h
@@ -16,17 +16,18 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \file
- * Generic bitmap handling (interface).
+/**
+ * \file
+ * Generic bitmap handling interface.
*
* This interface wraps the native platform-specific image format, so that
* portable image convertors can be written.
*
* Bitmaps are required to be 32bpp with components in the order RR GG BB AA.
- *
- * For example, an opaque 1x1 pixel image would yield the following bitmap
+ *
+ * For example, an opaque 1x1 pixel image would yield the following bitmap
* data:
- *
+ *
* Red : 0xff 0x00 0x00 0x00
* Green: 0x00 0xff 0x00 0x00
* Blue : 0x00 0x00 0xff 0x00
@@ -54,9 +55,9 @@
#define _NETSURF_IMAGE_BITMAP_H_
#define BITMAP_NEW 0
-#define BITMAP_OPAQUE (1 << 0) /** image is opaque */
-#define BITMAP_MODIFIED (1 << 1) /** buffer has been modified */
-#define BITMAP_CLEAR_MEMORY (1 << 2) /** memory should be wiped */
+#define BITMAP_OPAQUE (1 << 0) /**< image is opaque */
+#define BITMAP_MODIFIED (1 << 1) /**< buffer has been modified */
+#define BITMAP_CLEAR_MEMORY (1 << 2) /**< memory should be wiped */
struct content;
struct bitmap;
@@ -68,55 +69,98 @@ struct gui_bitmap_table {
/* Mandantory entries */
/**
- * Create a new bitmap
+ * Create a new bitmap.
+ *
+ * \param width width of image in pixels
+ * \param height width of image in pixels
+ * \param state The state to create the bitmap in.
+ * \return A bitmap structure or NULL on error.
*/
void *(*create)(int width, int height, unsigned int state);
/**
- * Destroy a bitmap
+ * Destroy a bitmap.
+ *
+ * \param bitmap The bitmap to destroy.
*/
void (*destroy)(void *bitmap);
/**
- * Set the opacity of a bitmap
+ * Set the opacity of a bitmap.
+ *
+ * \param bitmap The bitmap to set opacity on.
+ * \param opaque The bitmap opacity to set.
*/
void (*set_opaque)(void *bitmap, bool opaque);
/**
- * Get the opacity of a bitmap
+ * Get the opacity of a bitmap.
+ *
+ * \param bitmap The bitmap to examine.
+ * \return The bitmap opacity.
*/
bool (*get_opaque)(void *bitmap);
/**
+ * Test if a bitmap is opaque.
+ *
+ * \param bitmap The bitmap to examine.
+ * \return The bitmap opacity.
*/
bool (*test_opaque)(void *bitmap);
/**
+ * Get the image buffer from a bitmap
+ *
+ * \param bitmap The bitmap to get the buffer from.
+ * \return The image buffer or NULL if there is none.
*/
unsigned char *(*get_buffer)(void *bitmap);
/**
+ * Get the number of bytes per row of the image
+ *
+ * \param bitmap The bitmap
+ * \return The number of bytes for a row of the bitmap.
*/
size_t (*get_rowstride)(void *bitmap);
/**
+ * Get the bitmap width
+ *
+ * \param bitmap The bitmap
+ * \return The bitmap width in pixels.
*/
int (*get_width)(void *bitmap);
/**
+ * Get the bitmap height
+ *
+ * \param bitmap The bitmap
+ * \return The bitmap height in pixels.
*/
int (*get_height)(void *bitmap);
/**
+ * The the *bytes* per pixel.
+ *
+ * \param bitmap The bitmap
*/
size_t (*get_bpp)(void *bitmap);
/**
+ * Savde a bitmap to disc.
+ *
+ * \param bitmap The bitmap to save
+ * \param path The path to save the bitmap to.
+ * \param flags Flags affectin the save.
*/
bool (*save)(void *bitmap, const char *path, unsigned flags);
/**
* Marks a bitmap as modified.
+ *
+ * \param bitmap The bitmap set as modified.
*/
void (*modified)(void *bitmap);
};
--
NetSurf Browser
8 years, 1 month