Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/7d1e8a75fb0a6366927ac255ad2ae5c394ed1ddf
...commit
http://git.netsurf-browser.org/netsurf.git/commit/7d1e8a75fb0a6366927ac255ad2ae5c394ed1ddf
...tree
http://git.netsurf-browser.org/netsurf.git/tree/7d1e8a75fb0a6366927ac255ad2ae5c394ed1ddf
The branch, master has been updated
via 7d1e8a75fb0a6366927ac255ad2ae5c394ed1ddf (commit)
from 05ac4303058588a77b12e25951d378498a9b3449 (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=7d1e8a75fb0a6366927ac255ad2ae5c394ed1ddf
commit 7d1e8a75fb0a6366927ac255ad2ae5c394ed1ddf
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
single precision test
diff --git a/frontends/amiga/plotters.c b/frontends/amiga/plotters.c
index 4623afa..2e9f5cb 100644
--- a/frontends/amiga/plotters.c
+++ b/frontends/amiga/plotters.c
@@ -400,10 +400,10 @@ void ami_plot_clear_bbox(struct RastPort *rp, struct IBox
*bbox)
static void ami_arc_gfxlib(struct RastPort *rp, int x, int y, int radius, int
angle1, int angle2)
{
- double angle1_r = (double)(angle1) * (M_PI / 180.0);
- double angle2_r = (double)(angle2) * (M_PI / 180.0);
- double angle, b, c;
- double step = 0.1; //(angle2_r - angle1_r) / ((angle2_r - angle1_r) *
(double)radius);
+ float angle1_r = (float)(angle1) * (M_PI / 180.0);
+ float angle2_r = (float)(angle2) * (M_PI / 180.0);
+ float angle, b, c;
+ float step = 0.1; //(angle2_r - angle1_r) / ((angle2_r - angle1_r) *
(float)radius);
int x0, y0, x1, y1;
x0 = x;
@@ -412,13 +412,13 @@ static void ami_arc_gfxlib(struct RastPort *rp, int x,
int y, int radius, int an
b = angle1_r;
c = angle2_r;
- x1 = (int)(cos(b) * (double)radius);
- y1 = (int)(sin(b) * (double)radius);
+ x1 = (int)(cos(b) * (float)radius);
+ y1 = (int)(sin(b) * (float)radius);
Move(rp, x0 + x1, y0 - y1);
for(angle = (b + step); angle <= c; angle += step) {
- x1 = (int)(cos(angle) * (double)radius);
- y1 = (int)(sin(angle) * (double)radius);
+ x1 = (int)(cos(angle) * (float)radius);
+ y1 = (int)(sin(angle) * (float)radius);
Draw(rp, x0 + x1, y0 - y1);
}
}
@@ -580,7 +580,7 @@ HOOKF(void, ami_bitmap_tile_hook, struct RastPort *, rp,
struct BackFillMessage
static void ami_bezier(struct bez_point *restrict a, struct bez_point
*restrict b,
struct bez_point *restrict c, struct bez_point
*restrict d,
- double t, struct bez_point *restrict p) {
+ float t, struct bez_point *restrict p) {
p->x = pow((1 - t), 3) * a->x + 3 * t * pow((1 -t), 2) * b->x + 3 * (1-t)
* pow(t, 2)* c->x + pow (t, 3)* d->x;
p->y = pow((1 - t), 3) * a->y + 3 * t * pow((1 -t), 2) * b->y + 3 * (1-t)
* pow(t, 2)* c->y + pow (t, 3)* d->y;
}
@@ -953,7 +953,7 @@ ami_path(const struct redraw_context *ctx,
p_c.x = p[i+5];
p_c.y = p[i+6];
- for (double t = 0.0; t <= 1.0; t += 0.1) {
+ for (float t = 0.0; t <= 1.0; t += 0.1) {
ami_bezier(&cur_p, &p_a, &p_b, &p_c, t, &p_r);
if (pstyle->fill_colour != NS_TRANSPARENT) {
if (AreaDraw(glob->rp, p_r.x, p_r.y) ==
-1) {
diff --git a/frontends/amiga/print.c b/frontends/amiga/print.c
index 05f068b..4b48805 100644
--- a/frontends/amiga/print.c
+++ b/frontends/amiga/print.c
@@ -407,7 +407,7 @@ static BOOL ami_print_event(void *w)
void ami_print(struct hlcache_handle *c, int copies)
{
- double height;
+ float height;
float scale = nsoption_int(print_scale) / 100.0;
if(ami_print_info.msgport == NULL)
-----------------------------------------------------------------------
Summary of changes:
frontends/amiga/plotters.c | 20 ++++++++++----------
frontends/amiga/print.c | 2 +-
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/frontends/amiga/plotters.c b/frontends/amiga/plotters.c
index 4623afa..2e9f5cb 100644
--- a/frontends/amiga/plotters.c
+++ b/frontends/amiga/plotters.c
@@ -400,10 +400,10 @@ void ami_plot_clear_bbox(struct RastPort *rp, struct IBox
*bbox)
static void ami_arc_gfxlib(struct RastPort *rp, int x, int y, int radius, int
angle1, int angle2)
{
- double angle1_r = (double)(angle1) * (M_PI / 180.0);
- double angle2_r = (double)(angle2) * (M_PI / 180.0);
- double angle, b, c;
- double step = 0.1; //(angle2_r - angle1_r) / ((angle2_r - angle1_r) *
(double)radius);
+ float angle1_r = (float)(angle1) * (M_PI / 180.0);
+ float angle2_r = (float)(angle2) * (M_PI / 180.0);
+ float angle, b, c;
+ float step = 0.1; //(angle2_r - angle1_r) / ((angle2_r - angle1_r) *
(float)radius);
int x0, y0, x1, y1;
x0 = x;
@@ -412,13 +412,13 @@ static void ami_arc_gfxlib(struct RastPort *rp, int x,
int y, int radius, int an
b = angle1_r;
c = angle2_r;
- x1 = (int)(cos(b) * (double)radius);
- y1 = (int)(sin(b) * (double)radius);
+ x1 = (int)(cos(b) * (float)radius);
+ y1 = (int)(sin(b) * (float)radius);
Move(rp, x0 + x1, y0 - y1);
for(angle = (b + step); angle <= c; angle += step) {
- x1 = (int)(cos(angle) * (double)radius);
- y1 = (int)(sin(angle) * (double)radius);
+ x1 = (int)(cos(angle) * (float)radius);
+ y1 = (int)(sin(angle) * (float)radius);
Draw(rp, x0 + x1, y0 - y1);
}
}
@@ -580,7 +580,7 @@ HOOKF(void, ami_bitmap_tile_hook, struct RastPort *, rp,
struct BackFillMessage
static void ami_bezier(struct bez_point *restrict a, struct bez_point
*restrict b,
struct bez_point *restrict c, struct bez_point
*restrict d,
- double t, struct bez_point *restrict p) {
+ float t, struct bez_point *restrict p) {
p->x = pow((1 - t), 3) * a->x + 3 * t * pow((1 -t), 2) * b->x + 3 * (1-t)
* pow(t, 2)* c->x + pow (t, 3)* d->x;
p->y = pow((1 - t), 3) * a->y + 3 * t * pow((1 -t), 2) * b->y + 3 * (1-t)
* pow(t, 2)* c->y + pow (t, 3)* d->y;
}
@@ -953,7 +953,7 @@ ami_path(const struct redraw_context *ctx,
p_c.x = p[i+5];
p_c.y = p[i+6];
- for (double t = 0.0; t <= 1.0; t += 0.1) {
+ for (float t = 0.0; t <= 1.0; t += 0.1) {
ami_bezier(&cur_p, &p_a, &p_b, &p_c, t, &p_r);
if (pstyle->fill_colour != NS_TRANSPARENT) {
if (AreaDraw(glob->rp, p_r.x, p_r.y) ==
-1) {
diff --git a/frontends/amiga/print.c b/frontends/amiga/print.c
index 05f068b..4b48805 100644
--- a/frontends/amiga/print.c
+++ b/frontends/amiga/print.c
@@ -407,7 +407,7 @@ static BOOL ami_print_event(void *w)
void ami_print(struct hlcache_handle *c, int copies)
{
- double height;
+ float height;
float scale = nsoption_int(print_scale) / 100.0;
if(ami_print_info.msgport == NULL)
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org