r13511 mono - in /trunk/netsurf/atari/plot: plotter.h plotter_vdi.c

netsurf at semichrome.net netsurf at semichrome.net
Mon Mar 12 21:20:19 GMT 2012


Author: mono
Date: Mon Mar 12 16:20:18 2012
New Revision: 13511

URL: http://source.netsurf-browser.org?rev=13511&view=rev
Log:
Removed unused plotter members.

Modified:
    trunk/netsurf/atari/plot/plotter.h
    trunk/netsurf/atari/plot/plotter_vdi.c

Modified: trunk/netsurf/atari/plot/plotter.h
URL: http://source.netsurf-browser.org/trunk/netsurf/atari/plot/plotter.h?rev=13511&r1=13510&r2=13511&view=diff
==============================================================================
--- trunk/netsurf/atari/plot/plotter.h (original)
+++ trunk/netsurf/atari/plot/plotter.h Mon Mar 12 16:20:18 2012
@@ -48,14 +48,20 @@
 #endif
 
 #define MAX_FRAMEBUFS 0x010
-#define C2P (1<<0)	                    /* C2P convert buffer 1 to buffer 2 */
+#define C2P (1<<0)					/* C2P convert buffer 1 to buffer 2 */
 /* TODO: implement offscreen buffer switch */
 
-/* Plotter Flags: */
-#define PLOT_FLAG_OFFSCREEN 0x01	/* offsreen plotter should set/accept this flag */
-#define PLOT_FLAG_LOCKED 	0x02		/* plotter should set this flag during screen updates */
-#define PLOT_FLAG_DITHER 	0x04		/* true if the plotter shall dither images */
-#define PLOT_FLAG_TRANS		0x08		/* true if the plotter supports transparent operations */
+/* 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 */
+
+/* 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 */
+
+/* Plotter "internal" flags  */
+#define PLOT_FLAG_LOCKED 		0x08000	/* plotter should set this flag during screen updates */
 
 /* Font Plotter flags: */
 #define FONTPLOT_FLAG_MONOGLYPH 0x01
@@ -159,9 +165,6 @@
 typedef	void * (*_pmf_switch_to_framebuffer)(GEM_PLOTTER self);
 typedef	int (*_pmf_lock)(GEM_PLOTTER self);
 typedef	int (*_pmf_unlock)(GEM_PLOTTER self);
-typedef	int (*_pmf_update_region)(GEM_PLOTTER self, GRECT region);
-typedef	int (*_pmf_update_screen_region)( GEM_PLOTTER self, GRECT region );
-typedef	int (*_pmf_update_screen)(GEM_PLOTTER self);
 typedef	int (*_pmf_put_pixel)(GEM_PLOTTER self, int x, int y, int color );
 typedef	int (*_pmf_copy_rect)(GEM_PLOTTER self, GRECT src, GRECT dst );
 typedef	int (*_pmf_clip)(GEM_PLOTTER self, const struct rect * clip );
@@ -205,9 +208,6 @@
 	_pmf_unlock unlock;
 	_pmf_create_framebuffer create_framebuffer;
 	_pmf_switch_to_framebuffer switch_to_framebuffer;
-	_pmf_update_region update_region;
-	_pmf_update_screen update_screen;
-	_pmf_update_screen_region update_screen_region;
 	_pmf_put_pixel put_pixel;
 	_pmf_copy_rect copy_rect;
 	_pmf_clip clip;

Modified: trunk/netsurf/atari/plot/plotter_vdi.c
URL: http://source.netsurf-browser.org/trunk/netsurf/atari/plot/plotter_vdi.c?rev=13511&r1=13510&r2=13511&view=diff
==============================================================================
--- trunk/netsurf/atari/plot/plotter_vdi.c (original)
+++ trunk/netsurf/atari/plot/plotter_vdi.c Mon Mar 12 16:20:18 2012
@@ -50,9 +50,6 @@
 static int move( GEM_PLOTTER self, short x, short y );
 static int lock( GEM_PLOTTER self );
 static int unlock( GEM_PLOTTER self );
-static int update_region( GEM_PLOTTER self, GRECT region );
-static int update_screen_region( GEM_PLOTTER self, GRECT region );
-static int update_screen( GEM_PLOTTER self );
 static int put_pixel(GEM_PLOTTER self, int x, int y, int color );
 static int copy_rect( GEM_PLOTTER self, GRECT src, GRECT dst );
 static int arc(GEM_PLOTTER self,int x, int y, int radius, int angle1, int angle2, const plot_style_t * pstyle);
@@ -131,9 +128,6 @@
 	self->move = move;
 	self->lock = lock;
 	self->unlock = unlock;
-	self->update_region = update_region;
-	self->update_screen_region = update_screen_region;
-	self->update_screen = update_screen;
 	self->put_pixel = put_pixel;
 	self->copy_rect = copy_rect;
 	self->clip = plotter_std_clip;
@@ -347,99 +341,6 @@
 	return( 1 );
 }
 
-/*
-   region specifies an rectangle within the framebuffer
-   calculation of screen coords is done automatically.
-*/
-static int update_region( GEM_PLOTTER self, GRECT region )
-{
-	int src_offs;
-	GRECT screen_area, tmp, visible;
-	short pxy[10];
-	plotter_get_visible_grect( self, &visible );
-
-/*
-	LOG(("%s: %s %d\n", (char*)__FILE__, __FUNCTION__, __LINE__));
-	LOG(("region: x:%d, y:%d, w:%d, h:%d\n", region.g_x, region.g_y, region.g_w, region.g_h ));
-	LOG(("visible: x:%d, y:%d, w:%d, h:%d\n", visible.g_x, visible.g_y, visible.g_w, visible.g_h ));
-*/
-	/* sanitize region: */
-	tmp = region;
-	if( !rc_intersect(&visible, &tmp) )
-		return( 0 );
-/*
-    region is partially out of bottom or left:
-   if( region.g_x < self->visible.g_x )
-   {
-      region.g_w = self->visible.g_x - region.g_x;
-      region.g_x = self->visible.g_x;
-   }
-   if( region.g_y < self->visible.g_y )
-   {
-      region.g_h = self->visible.g_y - region.g_y;
-      region.g_y = self->visible.g_y;
-   }
-    region is partially out of top or right:
-   if( region.g_x + region.g_w > self->visible.g_x + self->visible.g_w )
-   {
-      region.g_w = self->visible.g_w - region.g_x;
-   }
-   if( region.g_y + region.g_h > self->visible.g_y + self->visible.g_h )
-   {
-      region.g_h = self->visible.g_h - region.g_y;
-   }
-    now region contains coords of framebuffer that needs redraw.
-*/
-	if( fbrect_to_screen( self, tmp, &screen_area) ) {
-		pxy[0] = screen_area.g_x;
-		pxy[1] = screen_area.g_y;
-		pxy[2] = screen_area.g_x + screen_area.g_w;
-		pxy[3] = screen_area.g_y;
-		pxy[4] = screen_area.g_x + screen_area.g_w;
-		pxy[5] = screen_area.g_y + screen_area.g_h;
-		pxy[6] = screen_area.g_x;
-		pxy[7] = screen_area.g_y + screen_area.g_h;
-		pxy[8] = screen_area.g_x;
-		pxy[9] = screen_area.g_y;
-	}
-   return( 1 );
-}
-
-/*
-   region specifies an rectangle within the screen,
-   calculation of framebuffer coords is done automatically.
-*/
-static int update_screen_region( GEM_PLOTTER self, GRECT region )
-{
-   LOG(("%s: %s\n", (char*)__FILE__, __FUNCTION__));
-
-   return( 1 );
-}
-
-/* Updates all visible parts of the framebuffer */
-static int update_screen( GEM_PLOTTER self )
-{
-	GRECT target, src;
-	int src_offset;
-	int i,x;
-	LOG(("%s: %s\n", (char*)__FILE__, __FUNCTION__));
-	if( !(PLOT_FLAG_OFFSCREEN & self->flags) )
-    	return( 0 );
-	target.g_x = src.g_x = 0;
-	target.g_y = src.g_y = 0;
-	target.g_w = src.g_w = CURFB(self).w;
-	target.g_h = src.g_h = CURFB(self).h;
-	if( !fbrect_to_screen( self, target, &target ) )
-		return( -1 );
-	src_offset = get_pixel_offset( CURFB(self).vis_x, CURFB(self).vis_y, CURFB(self).w, self->bpp_virt );
-	LOG(("area: x:%d ,y:%d ,w:%d ,h:%d, from: %p (offset: %d) \n",
-		target.g_x, target.g_y,
-         target.g_w, target.g_h,
-		((char*)CURFB(self).mem)+src_offset, src_offset
-	));
-
-   return( 1 );
-}
 static int put_pixel(GEM_PLOTTER self, int x, int y, int color )
 {
    LOG(("%s: %s\n", (char*)__FILE__, __FUNCTION__));




More information about the netsurf-commits mailing list