r5316 vince - in /branches/vince/netsurf-fb: ./ framebuffer/

netsurf at semichrome.net netsurf at semichrome.net
Mon Sep 15 00:35:32 BST 2008


Author: vince
Date: Sun Sep 14 18:35:32 2008
New Revision: 5316

URL: http://source.netsurf-browser.org?rev=5316&view=rev
Log:
abstract the os specific framebuffer init

Added:
    branches/vince/netsurf-fb/framebuffer/fb_init_able.c
Modified:
    branches/vince/netsurf-fb/Makefile.sources
    branches/vince/netsurf-fb/framebuffer/fb_16bpp_plotters.c
    branches/vince/netsurf-fb/framebuffer/fb_32bpp_plotters.c
    branches/vince/netsurf-fb/framebuffer/fb_8bpp_plotters.c
    branches/vince/netsurf-fb/framebuffer/fb_gui.c
    branches/vince/netsurf-fb/framebuffer/fb_gui.h
    branches/vince/netsurf-fb/framebuffer/fb_plotters.c
    branches/vince/netsurf-fb/framebuffer/fb_plotters.h

Modified: branches/vince/netsurf-fb/Makefile.sources
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/Makefile.sources?rev=5316&r1=5315&r2=5316&view=diff
==============================================================================
--- branches/vince/netsurf-fb/Makefile.sources (original)
+++ branches/vince/netsurf-fb/Makefile.sources Sun Sep 14 18:35:32 2008
@@ -91,8 +91,10 @@
 # S_FRAMEBUFFER are sources purely for the framebuffer build
 S_FRAMEBUFFER := fb_gui.c tree.c history.c hotlist.c fb_schedule.c thumbnail.c \
 	misc.c fb_bitmap.c fb_font.c font_8x16.c fb_filetype.c login.c \
-	fb_plotters.c fb_1bpp_plotters.c fb_8bpp_plotters.c \
-	fb_16bpp_plotters.c fb_32bpp_plotters.c
+	fb_plotters.c fb_8bpp_plotters.c \
+	fb_16bpp_plotters.c fb_32bpp_plotters.c \
+	fb_init_able.c
+#fb_1bpp_plotters.c
 S_FRAMEBUFFER := $(addprefix framebuffer/,$(S_FRAMEBUFFER))
 
 # Some extra rules for building the scanner etc.

Modified: branches/vince/netsurf-fb/framebuffer/fb_16bpp_plotters.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_16bpp_plotters.c?rev=5316&r1=5315&r2=5316&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_16bpp_plotters.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_16bpp_plotters.c Sun Sep 14 18:35:32 2008
@@ -28,13 +28,18 @@
 #include "framebuffer/fb_bitmap.h"
 #include "framebuffer/fb_font.h"
 
-
+#include "utils/utf8.h"
+
+
+extern framebuffer_t *framebuffer;
 extern struct gui_window *current_window;
 
 static inline uint16_t *
 fb_16bpp_get_xy_loc(int x, int y, struct gui_window *g)
 {
-        return (uint16_t *)(g->ptr + (y * g->linelen) + (x<<1));
+        return (uint16_t *)(framebuffer->ptr + 
+                            (y * framebuffer->linelen) + 
+                            (x << 1));
 }
 
 
@@ -65,10 +70,7 @@
 
         if (y0 == y1) {
                 /* horizontal line special cased */
-                if (x0 < fb_plot_ctx.x0)
-                        x0 = fb_plot_ctx.x0;
-                if (x1 > fb_plot_ctx.x1)
-                        x1 = fb_plot_ctx.x1;
+                fb_plotters_clip_rect_ctx(&x0, &y0, &x1, &y1);
 
                 LOG(("horiz: %d, %d, %d, %d, %d, 0x%lx, %d, %d",
                      x0,y0,x1,y1,width,c,dotted,dashed));
@@ -114,14 +116,14 @@
                                 y += dyabs;
                                 if (y >= dxabs) {
                                         y -= dxabs;
-                                        pvideo += sdy * (current_window->linelen>>1);
+                                        pvideo += sdy * (framebuffer->linelen>>1);
                                 }
                         }
                 } else {
                         /* the line is more vertical than horizontal */
                         for (i = 0; i <= dyabs; i++) {
                                 *pvideo = ent;
-                                pvideo += sdy * (current_window->linelen >> 1);
+                                pvideo += sdy * (framebuffer->linelen >> 1);
 
                                 x += dxabs;
                                 if (x >= dyabs) {
@@ -187,7 +189,7 @@
                 while (w-- > 0) {
                         *(pvideo + w) = ent;
                 }
-                pvideo += (current_window->linelen >> 1);
+                pvideo += (framebuffer->linelen >> 1);
         }
 
 	return true;
@@ -266,7 +268,7 @@
                                         *(pvideo + xloop) = fgcol;
                                 row = row >> 1;
                         }
-                        pvideo += (current_window->linelen >> 1);
+                        pvideo += (framebuffer->linelen >> 1);
                 }
 
         }
@@ -305,7 +307,6 @@
         uint16_t *pvideo;
         colour *pixel = (colour *)bitmap->pixdata;
         colour abpixel; /* alphablended pixel */
-        u16_t fbpixel; /* framebuffer pixel */
         int xloop, yloop;
         int x0,y0,x1,y1;
 
@@ -345,7 +346,7 @@
                 for (xloop = 0; xloop < width; xloop++) {
                         abpixel = pixel[(yloop * bitmap->width) + xloop];
                         if ((abpixel & 0xFF000000) != 0) {
-                                if ((abpixel & 0xFF000000) != 0xFF000000) {
+                                if ((abpixel & 0xFF000000) != 0xFF) {
                                         abpixel = fb_plotters_ablend(abpixel, 
                                          fb_16bpp_to_colour(*(pvideo + xloop)));
                                 }
@@ -357,7 +358,7 @@
 
                         }
                 }
-                pvideo += (current_window->linelen >> 1);
+                pvideo += (framebuffer->linelen >> 1);
         }
 
 	return true;

Modified: branches/vince/netsurf-fb/framebuffer/fb_32bpp_plotters.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_32bpp_plotters.c?rev=5316&r1=5315&r2=5316&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_32bpp_plotters.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_32bpp_plotters.c Sun Sep 14 18:35:32 2008
@@ -28,14 +28,15 @@
 
 #include "utils/log.h"
 
+extern framebuffer_t *framebuffer;
 extern struct gui_window *current_window;
-
-extern struct fb_info_s *fbinfo;
 
 static inline uint32_t *
 fb_32bpp_get_xy_loc(int x, int y, struct gui_window *g)
 {
-        return (uint32_t *)(g->ptr + (y * g->linelen) + (x<<2));
+        return (uint32_t *)(framebuffer->ptr + 
+                            (y * framebuffer->linelen) + 
+                            (x << 2));
 }
 
 static bool fb_32bpp_rectangle(int x0, int y0, int width, int height,
@@ -85,7 +86,7 @@
                 while (w-- > 0) {
                         *(video_char_start + w) = ent;
                 }
-                video_char_start += (current_window->linelen >> 2);
+                video_char_start += (framebuffer->linelen >> 2);
         }
 
 	return true;
@@ -107,7 +108,7 @@
 			const char *text, size_t length, colour bg, colour c)
 {
         const struct fb_font_desc* fb_font = fb_get_font(style);
-        u8_t *video_char_start;
+        uint32_t *pvideo;
         const u8_t *font_data;
         int xloop, yloop;
         unsigned char row;
@@ -128,12 +129,12 @@
              x,y,style,length,text,length,bg,c));
 
         for (chr=0; chr < length; chr++) {
-                video_char_start = fb_plotters_get_xy_loc(x + (chr * (fb_font->width)), y, fbinfo);
+                pvideo = fb_32bpp_get_xy_loc(x + (chr * (fb_font->width)), y, current_window);
 
                 /* move our font-data to the correct position */
                 font_data = fb_font->data + (text[chr] * fb_font->height);
 
-                video_char_start += (fb_font->width << 2);
+                pvideo += fb_font->width;
                 for (yloop = 0; yloop < fb_font->height; yloop++) {
                         row = font_data[yloop];
                         for (xloop = 0; xloop < fb_font->width; xloop ++) {
@@ -142,33 +143,17 @@
                                 else
                                         bitc = &fg_colour;
 
-                                video_char_start[0] = bitc->b;
-                                video_char_start[1] = bitc->g;
-                                video_char_start[2] = bitc->r;
-                                video_char_start[3] = bitc->a;
-                                video_char_start -= 4;
+                                pvideo[0] = bitc->b;
+                                pvideo[1] = bitc->g;
+                                pvideo[2] = bitc->r;
+                                pvideo[3] = bitc->a;
+                                pvideo -= 4;
                         }
-                        video_char_start += fbinfo->line_len +
-                                            (fb_font->width << 2);
+                        pvideo += (framebuffer->linelen >> 2) + fb_font->width;
                 }
 
         }
 
-        /* copied from css/css.h - need to open the correct font here
-         * font properties *
-         css_font_family font_family;
-         struct {
-         css_font_size_type size;
-         union {
-         struct css_length length;
-         float absolute;
-         float percent;
-         } value;
-         } font_size;
-         css_font_style font_style;
-         css_font_variant font_variant;
-         css_font_weight font_weight;
-        */
 	return true;
 }
 
@@ -190,38 +175,76 @@
         return pixel;
 }
 
+static inline colour fb_32bpp_to_colour(uint32_t pixel)
+{
+        return ((pixel & 0xFF) << 16) | 
+                ((pixel & 0xFF00)) | 
+                ((pixel & 0xFF0000) >> 16);
+}
 
 static bool fb_32bpp_bitmap(int x, int y, int width, int height,
 			struct bitmap *bitmap, colour bg, 
                         struct content *content)
 {
-        u8_t *video_char_start;
+        uint32_t *pvideo;
         colour *pixel = (colour *)bitmap->pixdata;
         colour abpixel; /* alphablended pixel */
-        int xloop,yloop;
-
-        video_char_start = fb_plotters_get_xy_loc(x, y, fbinfo);
+        int xloop, yloop;
+        int x0,y0,x1,y1;
+
+        /* LOG(("x %d, y %d, width %d, height %d, bitmap %p, content %p", 
+           x,y,width,height,bitmap,content));*/
+
+        /* TODO here we should scale the image from bitmap->width to width, for
+         * now simply crop. 
+         */
+        if (width > bitmap->width)
+                width = bitmap->width;
+
+        if (height > bitmap->height)
+                height = bitmap->height;
+
+        /* The part of the scaled image actually displayed is cropped to the
+         * current context. 
+         */
+        x0 = x;
+        y0 = y;
+        x1 = x + width;
+        y1 = y + height;
+
+        if (!fb_plotters_clip_rect_ctx(&x0, &y0, &x1, &y1))
+                return true;
+
+        if (height > (y1 - y0))
+                height = (y1 - y0);
+
+        if (width > (x1 - x0))
+                width = (x1 - x0);
+
+        /* plot the image */
+        pvideo = fb_32bpp_get_xy_loc(x0, y0, current_window);
 
         for (yloop = 0; yloop < height; yloop++) {
                 for (xloop = 0; xloop < width; xloop++) {
                         abpixel = pixel[(yloop * bitmap->width) + xloop];
                         if ((abpixel & 0xFF000000) != 0) {
-                                if ((abpixel & 0xFF000000) != 0xFF)
-                                        abpixel = fb_plotters_ablend(abpixel, video_char_start[xloop]);
-                                video_char_start[xloop] = abpixel;
-
-                                *((uint32_t*)video_char_start + (xloop << 2)) = 
-                                        ((abpixel & 0xFF) << 16) | 
-                                        ((abpixel & 0xFF00)) | 
-                                        ((abpixel & 0xFF0000) >> 16);
+                                if ((abpixel & 0xFF000000) != 0xFF) {
+                                        abpixel = fb_plotters_ablend(abpixel, 
+                                         fb_32bpp_to_colour(*(pvideo + xloop)));
+                                }
+
+                                *(pvideo + xloop) = ((abpixel & 0xFF) << 16) | 
+                                                    ((abpixel & 0xFF00)) | 
+                                                    ((abpixel & 0xFF0000) >> 16);
 
                         }
                 }
-                video_char_start += fbinfo->line_len;
+                pvideo += (framebuffer->linelen >> 2);
         }
 
 	return true;
 }
+
 
 static bool fb_32bpp_bitmap_tile(int x, int y, int width, int height,
 			struct bitmap *bitmap, colour bg,

Modified: branches/vince/netsurf-fb/framebuffer/fb_8bpp_plotters.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_8bpp_plotters.c?rev=5316&r1=5315&r2=5316&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_8bpp_plotters.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_8bpp_plotters.c Sun Sep 14 18:35:32 2008
@@ -28,14 +28,15 @@
 
 #include "utils/log.h"
 
-extern struct fb_info_s *fbinfo;
-
+extern framebuffer_t *framebuffer;
 extern struct gui_window *current_window;
 
 static inline uint8_t *
 fb_8bpp_get_xy_loc(int x, int y, struct gui_window *g)
 {
-        return (g->ptr + (y * g->linelen) + x);
+        return (uint8_t *)(framebuffer->ptr + 
+                           (y * framebuffer->linelen) + 
+                           (x));
 }
 
 static bool fb_8bpp_rectangle(int x0, int y0, int width, int height,
@@ -65,7 +66,7 @@
 static int
 find_closest_palette_entry(colour c)
 {
-        argb_t *palent;
+        colour palent;
         int col;
 
         int dr, dg, db; /* delta red, green blue values */
@@ -73,25 +74,13 @@
         int cur_distance;
         int best_distance = INT_MAX;
         int best_col = 0;
-        argb_t *palette = fbinfo->cur_palette; 
-        int palette_len = 256;
-        argb_t tomatch;
-
-        /* 0xbbggrr */
-        tomatch.r = c & 0xFF;
-        tomatch.g = (c >> 8) & 0xFF;
-        tomatch.b = (c >> 16) & 0xFF;
-
-        /* palette is not useful above 8bpp, ensure bounds */
-        if (palette_len > 256)
-                palette_len = 256;
-
-        for (col = 0; col < palette_len; col++) {
-                palent = palette + col;
-
-                dr = tomatch.r - palent->r;
-                dg = tomatch.g - palent->g;
-                db = tomatch.b - palent->b;
+
+        for (col = 0; col < 256; col++) {
+                palent = framebuffer->palette[col];
+
+                dr = (c & 0xFF) - (palent & 0xFF);
+                dg = ((c >> 8) & 0xFF) - ((palent >> 8) & 0xFF);
+                db = ((c >> 16) & 0xFF) - ((palent >> 16) & 0xFF);
                 cur_distance = ((dr * dr) + (dg * dg) + (db *db));
                 if (cur_distance < best_distance) {
                         best_distance = cur_distance;
@@ -104,11 +93,7 @@
 
 static colour calc_colour(u8_t c)
 {
-        argb_t palent = fbinfo->cur_palette[c];
-        colour pixel;
-    
-        pixel = 0xFF000000 | palent.b << 16 | palent.g << 8 | palent.r ; 
-        return pixel;
+        return framebuffer->palette[c];
 }
 
 static bool fb_8bpp_fill(int x0, int y0, int x1, int y1, colour c)
@@ -127,7 +112,7 @@
 
         for (y = y0; y < y1; y++) {
                 memset(pvideo, ent, x1 - x0);
-                pvideo += current_window->linelen;
+                pvideo += framebuffer->linelen;
         }
 
 	return true;
@@ -195,7 +180,7 @@
                                         pvideo[xloop] = fg_pent;
                                 row >>= 1;
                         }
-                        pvideo += current_window->linelen;
+                        pvideo += framebuffer->linelen;
                 }
         }
         return true;
@@ -237,7 +222,7 @@
                                 pvideo[xloop] = find_closest_palette_entry(abpixel);
                         }
                 }
-                pvideo += current_window->linelen;
+                pvideo += framebuffer->linelen;
         }
 
 	return true;

Modified: branches/vince/netsurf-fb/framebuffer/fb_gui.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_gui.c?rev=5316&r1=5315&r2=5316&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_gui.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_gui.c Sun Sep 14 18:35:32 2008
@@ -17,7 +17,6 @@
  */
 
 #include <sys/types.h>
-#include <able/fb.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <sys/ioctl.h>
@@ -40,9 +39,7 @@
 struct gui_window *current_window;
 struct gui_window *search_current_window;
 
-static const char *fbdevname = "(fb0)";
-struct fb_info_s *fbinfo;
-int devfd;
+framebuffer_t *framebuffer;
 
 //#define FILE_PFX "(cd0)/res/"
 #define FILE_PFX "(tftpboot)/"
@@ -73,8 +70,6 @@
 
 void gui_init(int argc, char** argv)
 {
-        int res;
-
         LOG(("%s(%d, %p)", __func__, argc, argv));
 
         messages_load(FILE_PFX "messages");
@@ -83,35 +78,16 @@
 
         option_max_cached_fetch_handles=1;
 
-        /* open display device */
-        devfd = open(fbdevname, O_RDWR);
-        if (devfd < 0) {
-                LOG(("Error opening output device %s", fbdevname));
-                return;
-        }
-
-        LOG(("Opened %s fd is %d",fbdevname, devfd));
-
-        res = ioctl(devfd, IOCTL_FB_GETINFO, &fbinfo);
-
-        if (res < 0) {
-                LOG(("Output device error"));
-                close(devfd);
-                return;
-        }
-
-        LOG(("Framebuffer device name %s bpp %d\n",
-             fbinfo->name,
-             fbinfo->screeninfo->bits_per_pixel));
-        
+        framebuffer = fb_init_os(argc, argv);
+
         //default_stylesheet_url = "file:/(cd0)/res/default.css";
         default_stylesheet_url = strdup("http://jennifer.kyllikki.org/~vince/res/default.css");
 
-        switch (fbinfo->screeninfo->bits_per_pixel) {
-        case 1:
+        switch (framebuffer->bpp) {
+                /*        case 1:
                 plot = framebuffer_1bpp_plot;
                 break;
-
+                */
         case 8:
                 plot = framebuffer_8bpp_plot;
                 break;
@@ -125,8 +101,7 @@
                 break;
 
         default:
-                LOG(("Unsupported bit depth (%d)\n", 
-                     fbinfo->screeninfo->bits_per_pixel));
+                LOG(("Unsupported bit depth (%d)", framebuffer->bpp));
                 exit(1);
         }
 
@@ -203,6 +178,7 @@
 void gui_quit(void)
 {
         LOG(("gui_quit"));
+        fb_quit_os(framebuffer);
 }
 
 
@@ -217,10 +193,10 @@
         if (g == NULL)
                 return NULL;
 
-        g->width = fbinfo->screeninfo->xres;
-        g->height = fbinfo->screeninfo->yres;
-        g->ptr = fbinfo->video_start + fbinfo->video_scroll;
-        g->linelen = fbinfo->line_len;
+        g->x = 0;
+        g->y = 0;
+        g->width = framebuffer->width;
+        g->height = framebuffer->height;
         g->bw = bw;
 
         return g;

Modified: branches/vince/netsurf-fb/framebuffer/fb_gui.h
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_gui.h?rev=5316&r1=5315&r2=5316&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_gui.h (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_gui.h Sun Sep 14 18:35:32 2008
@@ -16,16 +16,26 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+typedef struct {
+    int width;
+    int height;
+    u8_t *ptr; /**< Base of video memory. */
+    int linelen; /**< length of a video line. */
+    int bpp;
+    colour palette[256]; /* palette for index modes */
+} framebuffer_t;
+
 struct gui_window {
     int x;
     int y;
     int width; /**< Window width */
     int height; /**< window height */
 
-    u8_t *ptr; /**< Base of video memory for this window. */
-    int linelen; /**< length of a video line. */
-
     int scrolly; /**< y scroll offset */
     bool redraw_required; /**< flag indicating the foreground loop needs to redraw the window */
     struct browser_window *bw; /* The browser window connected to this gui window */
 };
+
+extern framebuffer_t *fb_init_os(int argc, char** argv);
+extern void fb_quit_os(framebuffer_t *fb);
+

Added: branches/vince/netsurf-fb/framebuffer/fb_init_able.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_init_able.c?rev=5316&view=auto
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_init_able.c (added)
+++ branches/vince/netsurf-fb/framebuffer/fb_init_able.c Sun Sep 14 18:35:32 2008
@@ -1,0 +1,77 @@
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <able/fb.h>
+
+#include "css/css.h"
+#include "framebuffer/fb_gui.h"
+#include "framebuffer/fb_plotters.h"
+
+#include "utils/log.h"
+
+int devfd;
+static const char *fbdevname = "(fb0)";
+
+framebuffer_t *fb_init_os(int argc, char** argv)
+{
+        framebuffer_t *newfb;
+        struct fb_info_s *fbinfo;
+        argb_t palent;
+        int ploop;
+        int res;
+
+        /* open display device */
+        devfd = open(fbdevname, O_RDWR);
+        if (devfd < 0) {
+                LOG(("Error opening output device %s", fbdevname));
+                return NULL;
+        }
+
+        LOG(("Opened %s fd is %d",fbdevname, devfd));
+
+        res = ioctl(devfd, IOCTL_FB_GETINFO, &fbinfo);
+
+        if (res < 0) {
+                LOG(("Output device error"));
+                close(devfd);
+                return NULL;
+        }
+
+        LOG(("Framebuffer device name %s bpp %d\n",
+             fbinfo->name,
+             fbinfo->screeninfo->bits_per_pixel));
+
+        newfb = calloc(1, sizeof(fb_info_t));
+
+        newfb->width = fbinfo->screeninfo->xres;
+        newfb->height = fbinfo->screeninfo->yres;
+        newfb->ptr = fbinfo->video_start + fbinfo->video_scroll;
+        newfb->linelen = fbinfo->line_len;
+        newfb->bpp = fbinfo->screeninfo->bits_per_pixel;
+
+        if (newfb->bpp <= 8) {
+                for(ploop=0; ploop<256; ploop++) {
+                        palent = fbinfo->cur_palette[ploop];
+
+                        newfb->palette[ploop] = 0xFF000000 | 
+                                                palent.b << 16 | 
+                                                palent.g << 8 | 
+                                                palent.r ; 
+                }
+        }
+
+
+        return newfb;
+}
+
+void fb_quit_os(framebuffer_t *fb)
+{
+}
+
+/*
+ * Local Variables:
+ * c-basic-offset:8
+ * End:
+ */
+

Modified: branches/vince/netsurf-fb/framebuffer/fb_plotters.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_plotters.c?rev=5316&r1=5315&r2=5316&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_plotters.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_plotters.c Sun Sep 14 18:35:32 2008
@@ -28,9 +28,6 @@
 #include "framebuffer/fb_gui.h"
 #include "framebuffer/fb_bitmap.h"
 #include "framebuffer/fb_font.h"
-
-
-extern struct fb_info_s *fbinfo;
 
 /* Currently selected ploting routines. */
 struct plotter_table plot;
@@ -162,19 +159,6 @@
         return fb_plotters_clip_line(&fb_plot_ctx, x0, y0, x1, y1);
 }
 
-u8_t *
-fb_plotters_get_y_loc(int y, fb_info_t *parms)
-{
-        return parms->video_start + parms->video_scroll + (parms->line_len * y);
-}
-
-u8_t *
-fb_plotters_get_xy_loc(int x, int y, fb_info_t *parms)
-{
-        return fb_plotters_get_y_loc(y, parms) + 
-                ((x * parms->screeninfo->bits_per_pixel) / 8);
-}
-
 /* generic setting of clipping rectangle */
 bool fb_clip(int x0, int y0, int x1, int y1)
 {
@@ -186,7 +170,7 @@
 	return true;
 }
 
-// a 19 b 182 g 0 r 0
+
 colour fb_plotters_ablend(colour pixel, colour scrpixel)
 {
         int opacity = (pixel >> 24) & 0xFF;

Modified: branches/vince/netsurf-fb/framebuffer/fb_plotters.h
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_plotters.h?rev=5316&r1=5315&r2=5316&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_plotters.h (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_plotters.h Sun Sep 14 18:35:32 2008
@@ -43,8 +43,6 @@
 bool fb_plotters_clip_line_ctx(int *x0, int *y0, int *x1, int *y1);
 bool fb_plotters_clip_line(const bbox_t *clip, int *x0, int *y0, int *x1, int *y1);
 
-u8_t *fb_plotters_get_y_loc(int y, fb_info_t *parms);
-u8_t *fb_plotters_get_xy_loc(int x, int y, fb_info_t *parms);
 colour fb_plotters_ablend(colour pixel, colour scrpixel);
 
 /* generic plotter entry points */




More information about the netsurf-commits mailing list