Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/3ba621759c4fb20dc35724414cb59c665686d418
...commit
http://git.netsurf-browser.org/netsurf.git/commit/3ba621759c4fb20dc35724414cb59c665686d418
...tree
http://git.netsurf-browser.org/netsurf.git/tree/3ba621759c4fb20dc35724414cb59c665686d418
The branch, chris/palette-mapped-plotters has been updated
via 3ba621759c4fb20dc35724414cb59c665686d418 (commit)
via 2eeb2c07bfe836b66ad3804b5c5a373c65674e59 (commit)
via 0d8aca4f125e9376444a9d4a1db729b99bf6cbea (commit)
via dd7935bb1f8f4437f47a1ebb097afd4c262e107f (commit)
via 391d483c9ded316cd3c40b77d37eb5ed021cd250 (commit)
via 9fac1daff4a99714ab95ff076ee7891b86bfc5e4 (commit)
via a262507b3aa67ca8af1b754646d0835b317a58d7 (commit)
from 0ce133099b7b4eff3b77cdabb164de0d406f5a62 (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/commitdiff/3ba621759c4fb20dc35724414cb59c665686d418
commit 3ba621759c4fb20dc35724414cb59c665686d418
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
hide internal palette-mapped and true-colour bitmap conversion functions
diff --git a/amiga/bitmap.c b/amiga/bitmap.c
index 3358265..69dc2dc 100644
--- a/amiga/bitmap.c
+++ b/amiga/bitmap.c
@@ -351,17 +351,7 @@ struct bitmap *ami_bitmap_from_datatype(char *filename)
return bm;
}
-struct BitMap *ami_bitmap_get_native(struct bitmap *bitmap,
- int width, int height, struct BitMap *friendbm)
-{
- if(ami_plot_screen_is_palettemapped() == true) {
- return ami_bitmap_get_palettemapped(bitmap, width, height);
- } else {
- return ami_getcachenativebm(bitmap, width, height, friendbm);
- }
-}
-
-struct BitMap *ami_getcachenativebm(struct bitmap *bitmap,int width,int
height,struct BitMap *friendbm)
+static struct BitMap *ami_getcachenativebm(struct bitmap *bitmap,int width,int
height,struct BitMap *friendbm)
{
struct RenderInfo ri;
struct BitMap *tbm = NULL;
@@ -477,7 +467,7 @@ struct BitMap *ami_getcachenativebm(struct bitmap
*bitmap,int width,int height,s
return tbm;
}
-struct BitMap *ami_bitmap_get_palettemapped(struct bitmap *bitmap,
+static struct BitMap *ami_bitmap_get_palettemapped(struct bitmap *bitmap,
int width, int height)
{
struct BitMap *dtbm;
@@ -521,3 +511,13 @@ struct BitMap *ami_bitmap_get_palettemapped(struct bitmap
*bitmap,
return dtbm;
}
+
+struct BitMap *ami_bitmap_get_native(struct bitmap *bitmap,
+ int width, int height, struct BitMap *friendbm)
+{
+ if(ami_plot_screen_is_palettemapped() == true) {
+ return ami_bitmap_get_palettemapped(bitmap, width, height);
+ } else {
+ return ami_getcachenativebm(bitmap, width, height, friendbm);
+ }
+}
diff --git a/amiga/bitmap.h b/amiga/bitmap.h
index ce5624c..bf25e8e 100755
--- a/amiga/bitmap.h
+++ b/amiga/bitmap.h
@@ -44,9 +44,6 @@ struct bitmap {
struct BitMap *ami_bitmap_get_native(struct bitmap *bitmap,
int width, int height, struct BitMap *friendbm);
-struct BitMap *ami_getcachenativebm(struct bitmap *bitmap,int width,int
height,struct BitMap *friendbm);
-struct BitMap *ami_bitmap_get_palettemapped(struct bitmap *bitmap, int width,
int height);
-
Object *ami_datatype_object_from_bitmap(struct bitmap *bitmap);
struct bitmap *ami_bitmap_from_datatype(char *filename);
#endif
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/2eeb2c07bfe836b66ad3804b5c5a373c65674e59
commit 2eeb2c07bfe836b66ad3804b5c5a373c65674e59
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
more use of abstracted function
diff --git a/amiga/icon.c b/amiga/icon.c
index e4d0cde..87a8a5c 100644
--- a/amiga/icon.c
+++ b/amiga/icon.c
@@ -382,7 +382,7 @@ void amiga_icon_superimpose_favicon_internal(struct
hlcache_handle *icon, struct
{
if ((icon != NULL) && (content_get_bitmap(icon) != NULL))
{
- bm = ami_getcachenativebm(content_get_bitmap(icon), 16,
16, NULL);
+ bm = ami_bitmap_get_native(content_get_bitmap(icon),
16, 16, NULL);
}
if(bm)
@@ -503,7 +503,7 @@ struct DiskObject *amiga_icon_from_bitmap(struct bitmap *bm)
if(bm)
{
- bitmap = ami_getcachenativebm(bm, THUMBNAIL_WIDTH,
+ bitmap = ami_bitmap_get_native(bm, THUMBNAIL_WIDTH,
THUMBNAIL_HEIGHT, NULL);
bm->icondata = AllocVec(THUMBNAIL_WIDTH * 4 * THUMBNAIL_HEIGHT,
MEMF_CLEAR);
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/0d8aca4f125e9376444a9d4a1db729b99bf6cbea
commit 0d8aca4f125e9376444a9d4a1db729b99bf6cbea
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
use abstracted function
diff --git a/amiga/gui.c b/amiga/gui.c
index 617b44f..f3670a4 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -3883,7 +3883,7 @@ void gui_window_set_search_ico(hlcache_handle *ico)
if (ico == NULL) ico = search_web_ico();
if ((ico != NULL) && (content_get_bitmap(ico) != NULL))
{
- bm = ami_getcachenativebm(content_get_bitmap(ico), 16, 16,
NULL);
+ bm = ami_bitmap_get_native(content_get_bitmap(ico), 16, 16,
NULL);
}
node = (struct nsObject *)GetHead((struct List *)window_list);
diff --git a/amiga/plotters.c b/amiga/plotters.c
index bfa8813..66c996e 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -642,12 +642,7 @@ static bool ami_bitmap(int x, int y, int width, int
height, struct bitmap *bitma
(y > glob->rect.MaxY))
return true;
- if(palette_mapped == false) {
- tbm = ami_getcachenativebm(bitmap, width, height,
glob->rp->BitMap);
- } else {
- tbm = ami_bitmap_get_palettemapped(bitmap, width, height);
- }
-
+ tbm = ami_bitmap_get_native(bitmap, width, height, glob->rp->BitMap);
if(!tbm) return true;
#ifdef AMI_PLOTTER_DEBUG
@@ -731,12 +726,7 @@ bool ami_bitmap_tile(int x, int y, int width, int height,
if((bitmap->opaque == false) && (bitmap->width == 1) && (bitmap->height
== 1))
return true;
- if(palette_mapped == false) {
- tbm =
ami_getcachenativebm(bitmap,width,height,glob->rp->BitMap);
- } else {
- tbm = ami_bitmap_get_palettemapped(bitmap, width, height);
- }
-
+ tbm = ami_bitmap_get_native(bitmap,width,height,glob->rp->BitMap);
if(!tbm) return true;
ox = x;
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/dd7935bb1f8f4437f47a1ebb097afd4c262e107f
commit dd7935bb1f8f4437f47a1ebb097afd4c262e107f
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
abstract the native bitmap fetcher functions, and make the favicon
collection use the new one.
diff --git a/amiga/bitmap.c b/amiga/bitmap.c
index 0190ed0..3358265 100644
--- a/amiga/bitmap.c
+++ b/amiga/bitmap.c
@@ -351,7 +351,15 @@ struct bitmap *ami_bitmap_from_datatype(char *filename)
return bm;
}
-
+struct BitMap *ami_bitmap_get_native(struct bitmap *bitmap,
+ int width, int height, struct BitMap *friendbm)
+{
+ if(ami_plot_screen_is_palettemapped() == true) {
+ return ami_bitmap_get_palettemapped(bitmap, width, height);
+ } else {
+ return ami_getcachenativebm(bitmap, width, height, friendbm);
+ }
+}
struct BitMap *ami_getcachenativebm(struct bitmap *bitmap,int width,int
height,struct BitMap *friendbm)
{
diff --git a/amiga/bitmap.h b/amiga/bitmap.h
index 3b6f147..ce5624c 100755
--- a/amiga/bitmap.h
+++ b/amiga/bitmap.h
@@ -42,6 +42,8 @@ struct bitmap {
ULONG *icondata; /* for appicons */
};
+struct BitMap *ami_bitmap_get_native(struct bitmap *bitmap,
+ int width, int height, struct BitMap *friendbm);
struct BitMap *ami_getcachenativebm(struct bitmap *bitmap,int width,int
height,struct BitMap *friendbm);
struct BitMap *ami_bitmap_get_palettemapped(struct bitmap *bitmap, int width,
int height);
diff --git a/amiga/gui.c b/amiga/gui.c
index 5d14521..617b44f 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -3823,7 +3823,7 @@ void gui_window_set_icon(struct gui_window *g,
hlcache_handle *icon)
if ((icon != NULL) && (content_get_bitmap(icon) != NULL))
{
- bm = ami_getcachenativebm(content_get_bitmap(icon), 16, 16,
+ bm = ami_bitmap_get_native(content_get_bitmap(icon), 16, 16,
g->shared->win->RPort->BitMap);
}
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/391d483c9ded316cd3c40b77d37eb5ed021cd250
commit 391d483c9ded316cd3c40b77d37eb5ed021cd250
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
expose function to get current screen palette-mapped status
diff --git a/amiga/plotters.c b/amiga/plotters.c
index eb39550..bfa8813 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -986,3 +986,8 @@ bool ami_path(const float *p, unsigned int n, colour fill,
float width,
#endif
return true;
}
+
+bool ami_plot_screen_is_palettemapped(void)
+{
+ return palette_mapped;
+}
diff --git a/amiga/plotters.h b/amiga/plotters.h
index 94dfaee..db767b6 100755
--- a/amiga/plotters.h
+++ b/amiga/plotters.h
@@ -65,6 +65,7 @@ void ami_init_layers(struct gui_globals *gg, ULONG width,
ULONG height);
void ami_free_layers(struct gui_globals *gg);
void ami_clearclipreg(struct gui_globals *gg);
void ami_plot_release_pens(struct MinList *shared_pens);
+bool ami_plot_screen_is_palettemapped(void);
struct gui_globals *glob;
#endif
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/9fac1daff4a99714ab95ff076ee7891b86bfc5e4
commit 9fac1daff4a99714ab95ff076ee7891b86bfc5e4
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
...or it might just crash. Will consider a hybrid mode, as palette-mapped
images do not display correctly when blitted to a 16- or 32-bit screen.
diff --git a/amiga/plotters.c b/amiga/plotters.c
index 2fbd735..eb39550 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -153,8 +153,7 @@ void ami_init_layers(struct gui_globals *gg, ULONG width,
ULONG height)
gg->areabuf = AllocVec(100, MEMF_PRIVATE | MEMF_CLEAR);
gg->tmprasbuf = AllocVec(width * height, MEMF_PRIVATE | MEMF_CLEAR);
- if((palette_mapped == true) ||
- ((depth == 16) && (nsoption_int(cairo_renderer) <= 0))) {
+ if(palette_mapped == true) {
gg->bm = AllocBitMap(width, height, depth, BMF_INTERLEAVED,
friend);
} else {
gg->bm = p96AllocBitMap(width, height, 32,
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/a262507b3aa67ca8af1b754646d0835b317a58d7
commit a262507b3aa67ca8af1b754646d0835b317a58d7
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
If using the gfx.lib true-colour plotters on a 16-bit screenmode, allocate
a 16-bit off-screen bitmap instead of a 32-bit one. This _should_ make things a
little quicker in that scenario.
diff --git a/amiga/plotters.c b/amiga/plotters.c
index 6ca3120..2fbd735 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -153,11 +153,12 @@ void ami_init_layers(struct gui_globals *gg, ULONG width,
ULONG height)
gg->areabuf = AllocVec(100, MEMF_PRIVATE | MEMF_CLEAR);
gg->tmprasbuf = AllocVec(width * height, MEMF_PRIVATE | MEMF_CLEAR);
- if(palette_mapped ==false) {
+ if((palette_mapped == true) ||
+ ((depth == 16) && (nsoption_int(cairo_renderer) <= 0))) {
+ gg->bm = AllocBitMap(width, height, depth, BMF_INTERLEAVED,
friend);
+ } else {
gg->bm = p96AllocBitMap(width, height, 32,
BMF_INTERLEAVED, friend,
RGBFB_A8R8G8B8);
- } else {
- gg->bm = AllocBitMap(width, height, depth, BMF_INTERLEAVED,
friend);
}
if(!gg->bm) warn_user("NoMemory","");
-----------------------------------------------------------------------
Summary of changes:
amiga/bitmap.c | 16 ++++++++++++----
amiga/bitmap.h | 5 ++---
amiga/gui.c | 4 ++--
amiga/icon.c | 4 ++--
amiga/plotters.c | 25 ++++++++++---------------
amiga/plotters.h | 1 +
6 files changed, 29 insertions(+), 26 deletions(-)
diff --git a/amiga/bitmap.c b/amiga/bitmap.c
index 0190ed0..69dc2dc 100644
--- a/amiga/bitmap.c
+++ b/amiga/bitmap.c
@@ -351,9 +351,7 @@ struct bitmap *ami_bitmap_from_datatype(char *filename)
return bm;
}
-
-
-struct BitMap *ami_getcachenativebm(struct bitmap *bitmap,int width,int
height,struct BitMap *friendbm)
+static struct BitMap *ami_getcachenativebm(struct bitmap *bitmap,int width,int
height,struct BitMap *friendbm)
{
struct RenderInfo ri;
struct BitMap *tbm = NULL;
@@ -469,7 +467,7 @@ struct BitMap *ami_getcachenativebm(struct bitmap
*bitmap,int width,int height,s
return tbm;
}
-struct BitMap *ami_bitmap_get_palettemapped(struct bitmap *bitmap,
+static struct BitMap *ami_bitmap_get_palettemapped(struct bitmap *bitmap,
int width, int height)
{
struct BitMap *dtbm;
@@ -513,3 +511,13 @@ struct BitMap *ami_bitmap_get_palettemapped(struct bitmap
*bitmap,
return dtbm;
}
+
+struct BitMap *ami_bitmap_get_native(struct bitmap *bitmap,
+ int width, int height, struct BitMap *friendbm)
+{
+ if(ami_plot_screen_is_palettemapped() == true) {
+ return ami_bitmap_get_palettemapped(bitmap, width, height);
+ } else {
+ return ami_getcachenativebm(bitmap, width, height, friendbm);
+ }
+}
diff --git a/amiga/bitmap.h b/amiga/bitmap.h
index 3b6f147..bf25e8e 100755
--- a/amiga/bitmap.h
+++ b/amiga/bitmap.h
@@ -42,9 +42,8 @@ struct bitmap {
ULONG *icondata; /* for appicons */
};
-struct BitMap *ami_getcachenativebm(struct bitmap *bitmap,int width,int
height,struct BitMap *friendbm);
-struct BitMap *ami_bitmap_get_palettemapped(struct bitmap *bitmap, int width,
int height);
-
+struct BitMap *ami_bitmap_get_native(struct bitmap *bitmap,
+ int width, int height, struct BitMap *friendbm);
Object *ami_datatype_object_from_bitmap(struct bitmap *bitmap);
struct bitmap *ami_bitmap_from_datatype(char *filename);
#endif
diff --git a/amiga/gui.c b/amiga/gui.c
index 5d14521..f3670a4 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -3823,7 +3823,7 @@ void gui_window_set_icon(struct gui_window *g,
hlcache_handle *icon)
if ((icon != NULL) && (content_get_bitmap(icon) != NULL))
{
- bm = ami_getcachenativebm(content_get_bitmap(icon), 16, 16,
+ bm = ami_bitmap_get_native(content_get_bitmap(icon), 16, 16,
g->shared->win->RPort->BitMap);
}
@@ -3883,7 +3883,7 @@ void gui_window_set_search_ico(hlcache_handle *ico)
if (ico == NULL) ico = search_web_ico();
if ((ico != NULL) && (content_get_bitmap(ico) != NULL))
{
- bm = ami_getcachenativebm(content_get_bitmap(ico), 16, 16,
NULL);
+ bm = ami_bitmap_get_native(content_get_bitmap(ico), 16, 16,
NULL);
}
node = (struct nsObject *)GetHead((struct List *)window_list);
diff --git a/amiga/icon.c b/amiga/icon.c
index e4d0cde..87a8a5c 100644
--- a/amiga/icon.c
+++ b/amiga/icon.c
@@ -382,7 +382,7 @@ void amiga_icon_superimpose_favicon_internal(struct
hlcache_handle *icon, struct
{
if ((icon != NULL) && (content_get_bitmap(icon) != NULL))
{
- bm = ami_getcachenativebm(content_get_bitmap(icon), 16,
16, NULL);
+ bm = ami_bitmap_get_native(content_get_bitmap(icon),
16, 16, NULL);
}
if(bm)
@@ -503,7 +503,7 @@ struct DiskObject *amiga_icon_from_bitmap(struct bitmap *bm)
if(bm)
{
- bitmap = ami_getcachenativebm(bm, THUMBNAIL_WIDTH,
+ bitmap = ami_bitmap_get_native(bm, THUMBNAIL_WIDTH,
THUMBNAIL_HEIGHT, NULL);
bm->icondata = AllocVec(THUMBNAIL_WIDTH * 4 * THUMBNAIL_HEIGHT,
MEMF_CLEAR);
diff --git a/amiga/plotters.c b/amiga/plotters.c
index 6ca3120..66c996e 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -153,11 +153,11 @@ void ami_init_layers(struct gui_globals *gg, ULONG width,
ULONG height)
gg->areabuf = AllocVec(100, MEMF_PRIVATE | MEMF_CLEAR);
gg->tmprasbuf = AllocVec(width * height, MEMF_PRIVATE | MEMF_CLEAR);
- if(palette_mapped ==false) {
+ if(palette_mapped == true) {
+ gg->bm = AllocBitMap(width, height, depth, BMF_INTERLEAVED,
friend);
+ } else {
gg->bm = p96AllocBitMap(width, height, 32,
BMF_INTERLEAVED, friend,
RGBFB_A8R8G8B8);
- } else {
- gg->bm = AllocBitMap(width, height, depth, BMF_INTERLEAVED,
friend);
}
if(!gg->bm) warn_user("NoMemory","");
@@ -642,12 +642,7 @@ static bool ami_bitmap(int x, int y, int width, int
height, struct bitmap *bitma
(y > glob->rect.MaxY))
return true;
- if(palette_mapped == false) {
- tbm = ami_getcachenativebm(bitmap, width, height,
glob->rp->BitMap);
- } else {
- tbm = ami_bitmap_get_palettemapped(bitmap, width, height);
- }
-
+ tbm = ami_bitmap_get_native(bitmap, width, height, glob->rp->BitMap);
if(!tbm) return true;
#ifdef AMI_PLOTTER_DEBUG
@@ -731,12 +726,7 @@ bool ami_bitmap_tile(int x, int y, int width, int height,
if((bitmap->opaque == false) && (bitmap->width == 1) && (bitmap->height
== 1))
return true;
- if(palette_mapped == false) {
- tbm =
ami_getcachenativebm(bitmap,width,height,glob->rp->BitMap);
- } else {
- tbm = ami_bitmap_get_palettemapped(bitmap, width, height);
- }
-
+ tbm = ami_bitmap_get_native(bitmap,width,height,glob->rp->BitMap);
if(!tbm) return true;
ox = x;
@@ -986,3 +976,8 @@ bool ami_path(const float *p, unsigned int n, colour fill,
float width,
#endif
return true;
}
+
+bool ami_plot_screen_is_palettemapped(void)
+{
+ return palette_mapped;
+}
diff --git a/amiga/plotters.h b/amiga/plotters.h
index 94dfaee..db767b6 100755
--- a/amiga/plotters.h
+++ b/amiga/plotters.h
@@ -65,6 +65,7 @@ void ami_init_layers(struct gui_globals *gg, ULONG width,
ULONG height);
void ami_free_layers(struct gui_globals *gg);
void ami_clearclipreg(struct gui_globals *gg);
void ami_plot_release_pens(struct MinList *shared_pens);
+bool ami_plot_screen_is_palettemapped(void);
struct gui_globals *glob;
#endif
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://vlists.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org