Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!david From: david@sun.uucp (David DiGiacomo) Newsgroups: comp.graphics Subject: Re: Sun pixrect rops Message-ID: <57247@sun.uucp> Date: 20 Jun 88 19:36:01 GMT References: <11115@agate.BERKELEY.EDU> Organization: Sun Microsystems, Inc. - Mtn View, CA Lines: 21 In article <11115@agate.BERKELEY.EDU> chernoff@cartan.berkeley.edu (Paul R. Chernoff) writes: >I would like to know why the Sun pixrect operation >for copying a "vertical" rectangle of a given size >(say 1 by 500) takes much longer than the corresponding >operation for copying a "horizontal" rectangle (say 500x1). It's because successive horizontal pixels are part of the same memory word and can be manipulated as a unit. On monochrome frame buffers ("bw2") 32 horizontally adjacent pixels can be read or written with one memory access. On 8 bit color frame buffers there are 4 ("cg4") or effectively 2, 4, or 16 ("cg2" frame buffers with rasterop chips) pixels per memory word. Reading a 500 pixel vertical stripe from a monochrome frame buffer requires 500 memory accesses as opposed to only 16 accesses for a horizontal stripe. (Operating on a single bit within a word also requires additional shift/mask effort, but the most significant factor is the number of memory accesses.) -- David DiGiacomo, Sun Microsystems, Mt. View, CA sun!david david@sun.com