Index: gdisplay.c
===================================================================
RCS file: /debian/home/gnomecvs/gimp/app/gdisplay.c,v
retrieving revision 1.37
diff -u -r1.37 gdisplay.c
--- gdisplay.c	1998/08/16 13:12:57	1.37
+++ gdisplay.c	1998/08/18 23:27:14
@@ -55,17 +55,6 @@
 static int             display_num  = 1;
 static GdkCursorType   default_gdisplay_cursor = GDK_TOP_LEFT_ARROW;
 
-static char *image_type_strs[] =
-{
-  "RGB",
-  "RGB-alpha",
-  "grayscale",
-  "grayscale-alpha",
-  "indexed",
-  "indexed-alpha"
-};
-
-
 /*  Local functions  */
 static void       gdisplay_format_title     (GimpImage *, char *);
 static void       gdisplay_delete           (GDisplay *);
@@ -160,23 +149,20 @@
 
   empty = gimage_is_empty (gimage);
 
-  if (gimage_is_flat (gimage))
-    image_type_str = image_type_strs[drawable_type (gimage_active_drawable (gimage))];
-  else
-    switch (gimage_base_type (gimage))
-      {
-      case RGB:
-	image_type_str = (empty) ? "RGB-empty" : "RGB-layered";
-	break;
-      case GRAY:
-	image_type_str = (empty) ? "grayscale-empty" : "grayscale-layered";
-	break;
-      case INDEXED:
-	image_type_str = (empty) ? "indexed-empty" : "indexed-layered";
-	break;
-      default:
-	image_type_str = NULL;
-      }
+  switch (gimage_base_type (gimage))
+    {
+    case RGB:
+      image_type_str = (empty) ? "RGB-empty" : "RGB";
+      break;
+    case GRAY:
+      image_type_str = (empty) ? "grayscale-empty" : "grayscale";
+      break;
+    case INDEXED:
+      image_type_str = (empty) ? "indexed-empty" : "indexed";
+      break;
+    default:
+      image_type_str = NULL;
+    }
 
   g_snprintf (title, MAX_TITLE_BUF, "%s-%d.%d (%s)",
 	      prune_filename (gimage_filename (gimage)),
Index: gimage.h
===================================================================
RCS file: /debian/home/gnomecvs/gimp/app/gimage.h,v
retrieving revision 1.9
diff -u -r1.9 gimage.h
--- gimage.h	1998/07/01 23:06:36	1.9
+++ gimage.h	1998/08/18 23:27:14
@@ -95,9 +95,6 @@
 #define gimage_construct gimp_image_construct
 #define gimage_invalidate gimp_image_invalidate
 #define gimage_validate gimp_image_validate
-#define gimage_inflate gimp_image_inflate
-#define gimage_deflate gimp_image_deflate
-#define gimage_is_flat gimp_image_is_flat
 #define gimage_is_empty gimp_image_is_empty
 #define gimage_active_drawable gimp_image_active_drawable
 #define gimage_base_type gimp_image_base_type
Index: gimpimage.c
===================================================================
RCS file: /debian/home/gnomecvs/gimp/app/gimpimage.c,v
retrieving revision 1.12
diff -u -r1.12 gimpimage.c
--- gimpimage.c	1998/08/15 19:17:13	1.12
+++ gimpimage.c	1998/08/18 23:27:35
@@ -129,7 +129,6 @@
   gimage->shadow = NULL;
   gimage->dirty = 1;
   gimage->undo_on = TRUE;
-  gimage->flat = TRUE;
   gimage->construct_flag = -1;
   gimage->projection = NULL;
   gimage->guides = NULL;
@@ -1177,27 +1176,23 @@
 void
 gimp_image_construct (GimpImage *gimage, int x, int y, int w, int h)
 {
-  /*  if the gimage is not flat, construction is necessary.  */
-  if (! gimp_image_is_flat (gimage))
-    {
-      /*  set the construct flag, used to determine if anything
-       *  has been written to the gimage raw image yet.
-       */
-      gimage->construct_flag = 0;
-
-      /*  First, determine if the projection image needs to be
-       *  initialized--this is the case when there are no visible
-       *  layers that cover the entire canvas--either because layers
-       *  are offset or only a floating selection is visible
-       */
-      gimp_image_initialize_projection (gimage, x, y, w, h);
-
-      /*  call functions which process the list of layers and
-       *  the list of channels
-       */
-      gimp_image_construct_layers (gimage, x, y, w, h);
-      gimp_image_construct_channels (gimage, x, y, w, h);
-    }
+  /*  set the construct flag, used to determine if anything
+   *  has been written to the gimage raw image yet.
+   */
+  gimage->construct_flag = 0;
+  
+  /*  First, determine if the projection image needs to be
+   *  initialized--this is the case when there are no visible
+   *  layers that cover the entire canvas--either because layers
+   *  are offset or only a floating selection is visible
+   */
+  gimp_image_initialize_projection (gimage, x, y, w, h);
+  
+  /*  call functions which process the list of layers and
+   *  the list of channels
+   */
+  gimp_image_construct_layers (gimage, x, y, w, h);
+  gimp_image_construct_channels (gimage, x, y, w, h);
 }
 
 void
@@ -1210,9 +1205,7 @@
   int startx, starty;
   int endx, endy;
   int tilex, tiley;
-  int flat;
 
-  flat = gimp_image_is_flat (gimage);
   tm = gimp_image_projection (gimage);
 
   startx = x;
@@ -1231,47 +1224,44 @@
 	/*  invalidate all lower level tiles  */
 	/*tile_manager_invalidate_tiles (gimp_image_projection (gimage), tile);*/
 
-	if (! flat)
-	  {
-	    /*  check if the tile is outside the bounds  */
-	    if ((MIN ((j + tile_ewidth(tile)), x2) - MAX (j, x1)) <= 0)
-	      {
-		tile_invalidate_tile (&tile, tm, j, i);
-		if (j < x1)
-		  startx = MAX (startx, (j + tile_ewidth(tile)));
-		else
-		  endx = MIN (endx, j);
-	      }
-	    else if (MIN ((i + tile_eheight(tile)), y2) - MAX (i, y1) <= 0)
-	      {
-		tile_invalidate_tile (&tile, tm, j, i);
-		if (i < y1)
-		  starty = MAX (starty, (i + tile_eheight(tile)));
-		else
-		  endy = MIN (endy, i);
-	      }
-	    else
-	      {
-		/*  If the tile is not valid, make sure we get the entire tile
-		 *   in the construction extents
-		 */
-		if (tile_is_valid(tile) == FALSE)
-		  {
-		    tilex = j - (j % TILE_WIDTH);
-		    tiley = i - (i % TILE_HEIGHT);
-
-		    startx = MIN (startx, tilex);
-		    endx = MAX (endx, tilex + tile_ewidth(tile));
-		    starty = MIN (starty, tiley);
-		    endy = MAX (endy, tiley + tile_eheight(tile));
-
-		    tile_mark_valid (tile); /* hmmmmmmm..... */
-		  }
-	      }
-	  }
+        /*  check if the tile is outside the bounds  */
+        if ((MIN ((j + tile_ewidth(tile)), x2) - MAX (j, x1)) <= 0)
+          {
+            tile_invalidate_tile (&tile, tm, j, i);
+            if (j < x1)
+              startx = MAX (startx, (j + tile_ewidth(tile)));
+            else
+              endx = MIN (endx, j);
+          }
+        else if (MIN ((i + tile_eheight(tile)), y2) - MAX (i, y1) <= 0)
+          {
+            tile_invalidate_tile (&tile, tm, j, i);
+            if (i < y1)
+              starty = MAX (starty, (i + tile_eheight(tile)));
+            else
+              endy = MIN (endy, i);
+          }
+        else
+          {
+            /*  If the tile is not valid, make sure we get the entire tile
+             *   in the construction extents
+             */
+            if (tile_is_valid(tile) == FALSE)
+              {
+                tilex = j - (j % TILE_WIDTH);
+                tiley = i - (i % TILE_HEIGHT);
+                
+                startx = MIN (startx, tilex);
+                endx = MAX (endx, tilex + tile_ewidth(tile));
+                starty = MIN (starty, tiley);
+                endy = MAX (endy, tiley + tile_eheight(tile));
+                
+                tile_mark_valid (tile); /* hmmmmmmm..... */
+              }
+          }
       }
 
-  if (! flat && (endx - startx) > 0 && (endy - starty) > 0)
+  if ((endx - startx) > 0 && (endy - starty) > 0)
     gimp_image_construct (gimage, startx, starty, (endx - startx), (endy - starty));
 }
 
@@ -2374,68 +2364,6 @@
 /************************************************************/
 
 int
-gimp_image_is_flat (GimpImage *gimage)
-{
-  Layer *layer;
-  int ac_visible = TRUE;
-  int flat = TRUE;
-  int off_x, off_y;
-
-  /*  Are there no layers?  */
-  if (gimp_image_is_empty (gimage))
-    flat = FALSE;
-  /*  Is there more than one layer?  */
-  else if (gimage->layers->next)
-    flat = FALSE;
-  else
-    {
-      /*  determine if all channels are visible  */
-      int a, b;
-
-      layer = gimage->layers->data;
-      a = layer_has_alpha (layer) ? drawable_bytes (GIMP_DRAWABLE(layer)) - 1 : drawable_bytes (GIMP_DRAWABLE(layer));
-      for (b = 0; b < a; b++)
-	if (gimage->visible[b] == FALSE)
-	  ac_visible = FALSE;
-
-      /*  What makes a flat image?
-       *  1) the solitary layer is exactly gimage-sized and placed
-       *  2) no layer mask
-       *  3) opacity == OPAQUE_OPACITY
-       *  4) all channels must be visible
-       */
-      drawable_offsets (GIMP_DRAWABLE(layer), &off_x, &off_y);
-      if ((drawable_width (GIMP_DRAWABLE(layer)) != gimage->width) ||
-	  (drawable_height (GIMP_DRAWABLE(layer)) != gimage->height) ||
-	  (off_x != 0) ||
-	  (off_y != 0) ||
-	  (layer->mask != NULL) ||
-	  (layer->opacity != OPAQUE_OPACITY) ||
-	  (ac_visible == FALSE))
-	flat = FALSE;
-    }
-
-  /*  Are there any channels?  */
-  if (gimage->channels)
-    flat = FALSE;
-
-  /* AUGH! This is supposed to be a _predicate_ function */
-  if (gimage->flat != flat)
-    {
-	    if (flat)
-		    gimp_image_free_projection (gimage);
-	    else
-		    gimp_image_allocate_projection (gimage);
-	    gimage->flat=flat;
-	    gtk_signal_emit(GTK_OBJECT(gimage),
-			    gimp_image_signals[RESTRUCTURE]);
-    }
-
-
-  return gimage->flat;
-}
-
-int
 gimp_image_is_empty (GimpImage *gimage)
 {
   return (! gimage->layers);
@@ -2561,90 +2489,36 @@
 TileManager *
 gimp_image_projection (GimpImage *gimage)
 {
-  Layer * layer;
-
-  /*  If the gimage is flat, we simply want the data of the
-   *  first layer...Otherwise, we'll pass back the projection
-   */
-  if (gimp_image_is_flat (gimage))
-    {
-      if ((layer = gimage->active_layer))
-	return drawable_data (GIMP_DRAWABLE(layer));
-      else
-	return NULL;
-    }
-  else
-    {
-      if ((tile_manager_level_width (gimage->projection) != gimage->width) ||
-	  (tile_manager_level_height (gimage->projection) != gimage->height))
-	gimp_image_allocate_projection (gimage);
-
-      return gimage->projection;
-    }
+  if ((gimage->projection == NULL) ||
+      (tile_manager_level_width (gimage->projection) != gimage->width) ||
+      (tile_manager_level_height (gimage->projection) != gimage->height))
+    gimp_image_allocate_projection (gimage);
+  
+  return gimage->projection;
 }
 
 int
 gimp_image_projection_type (GimpImage *gimage)
 {
-  Layer * layer;
-
-  /*  If the gimage is flat, we simply want the type of the
-   *  first layer...Otherwise, we'll pass back the proj_type
-   */
-  if (gimp_image_is_flat (gimage))
-    {
-      if ((layer =  (gimage->active_layer)))
-	return drawable_type (GIMP_DRAWABLE(layer));
-      else
-	return -1;
-    }
-  else
-    return gimage->proj_type;
+  return gimage->proj_type;
 }
 
 int
 gimp_image_projection_bytes (GimpImage *gimage)
 {
-  Layer * layer;
-
-  /*  If the gimage is flat, we simply want the bytes in the
-   *  first layer...Otherwise, we'll pass back the proj_bytes
-   */
-  if (gimp_image_is_flat (gimage))
-    {
-      if ((layer =  (gimage->active_layer)))
-	return drawable_bytes (GIMP_DRAWABLE(layer));
-      else
-	return -1;
-    }
-  else
-    return gimage->proj_bytes;
+  return gimage->proj_bytes;
 }
 
 int
 gimp_image_projection_opacity (GimpImage *gimage)
 {
-  Layer * layer;
-
-  /*  If the gimage is flat, return the opacity of the active layer
-   *  Otherwise, we'll pass back OPAQUE_OPACITY
-   */
-  if (gimp_image_is_flat (gimage))
-    {
-      if ((layer =  (gimage->active_layer)))
-	return layer->opacity;
-      else
-	return OPAQUE_OPACITY;
-    }
-  else
-    return OPAQUE_OPACITY;
+  return OPAQUE_OPACITY;
 }
 
 void
 gimp_image_projection_realloc (GimpImage *gimage)
 {
-  if (! gimp_image_is_flat (gimage))
-    gimp_image_allocate_projection (gimage);
+  gimp_image_allocate_projection (gimage);
 }
 
 /************************************************************/
Index: gimpimage.h
===================================================================
RCS file: /debian/home/gnomecvs/gimp/app/gimpimage.h,v
retrieving revision 1.6
diff -u -r1.6 gimpimage.h
--- gimpimage.h	1998/08/15 19:17:14	1.6
+++ gimpimage.h	1998/08/18 23:27:36
@@ -158,13 +158,10 @@
 void            gimp_image_construct              (GimpImage *, int, int, int, int);
 void            gimp_image_invalidate             (GimpImage *, int, int, int, int, int, int, int, int);
 void            gimp_image_validate               (TileManager *, Tile *);
-void            gimp_image_inflate                (GimpImage *);
-void            gimp_image_deflate                (GimpImage *);
 
 
 /*  Access functions  */
 
-int             gimp_image_is_flat                (GimpImage *);
 int             gimp_image_is_empty               (GimpImage *);
 GimpDrawable *  gimp_image_active_drawable        (GimpImage *);
 int             gimp_image_base_type              (GimpImage *);
Index: gimpimageP.h
===================================================================
RCS file: /debian/home/gnomecvs/gimp/app/gimpimageP.h,v
retrieving revision 1.3
diff -u -r1.3 gimpimageP.h
--- gimpimageP.h	1998/06/30 15:31:19	1.3
+++ gimpimageP.h	1998/08/18 23:27:36
@@ -33,7 +33,6 @@
   TileManager *shadow;                /*  shadow buffer tiles          */
 
                                       /*  Projection attributes  */
-  int flat;                           /*  Is the gimp_image flat?          */
   int construct_flag;                 /*  flag for construction        */
   int proj_type;                      /*  type of the projection image */
   int proj_bytes;                     /*  bpp in projection image      */
Index: image_render.c
===================================================================
RCS file: /debian/home/gnomecvs/gimp/app/image_render.c,v
retrieving revision 1.10
diff -u -r1.10 image_render.c
--- image_render.c	1998/08/15 19:17:17	1.10
+++ image_render.c	1998/08/18 23:27:41
@@ -2343,6 +2343,7 @@
 			int         h)
 {
   info->gdisp = gdisp;
+  info->src_tiles = gimage_projection (gdisp->gimage);
   info->x = x + gdisp->offset_x;
   info->y = y + gdisp->offset_y;
   info->w = w;
@@ -2357,7 +2358,6 @@
   info->dest_bpl = gximage_get_bpl ();
   info->dest_width = info->w * info->dest_bpp;
   info->byte_order = gximage_get_byte_order ();
-  info->src_tiles = gimage_projection (gdisp->gimage);
   info->scale = render_image_accelerate_scaling (w, info->x, info->src_bpp, info->scalesrc, info->scaledest);
   info->alpha = NULL;
 
Index: info_window.c
===================================================================
RCS file: /debian/home/gnomecvs/gimp/app/info_window.c,v
retrieving revision 1.3
diff -u -r1.3 info_window.c
--- info_window.c	1998/08/15 13:34:46	1.3
+++ info_window.c	1998/08/18 23:27:53
@@ -184,7 +184,6 @@
   GDisplay *gdisp;
   InfoWinData *iwd;
   int type;
-  int flat;
 
   gdisp = (GDisplay *) gdisp_ptr;
   iwd = (InfoWinData *) info_win->user_data;
@@ -198,21 +197,14 @@
 	   SCALEDEST (gdisp), SCALESRC (gdisp));
 
   type = gimage_base_type (gdisp->gimage);
-  flat = gimage_is_flat (gdisp->gimage);
 
   /*  color type  */
-  if (type == RGB && flat)
+  if (type == RGB)
     sprintf (iwd->color_type_str, "%s", "RGB Color");
-  else if (type == GRAY && flat)
+  else if (type == GRAY)
     sprintf (iwd->color_type_str, "%s", "Grayscale");
-  else if (type == INDEXED && flat)
+  else if (type == INDEXED)
     sprintf (iwd->color_type_str, "%s", "Indexed Color");
-  if (type == RGB && !flat)
-    sprintf (iwd->color_type_str, "%s", "RGB-alpha Color");
-  else if (type == GRAY && !flat)
-    sprintf (iwd->color_type_str, "%s", "Grayscale-alpha");
-  else if (type == INDEXED && !flat)
-    sprintf (iwd->color_type_str, "%s", "Indexed-alpha Color");
 
   /*  visual class  */
   if (type == RGB ||
