 |
Index for Section 9 |
|
 |
Alphabetical listing for C |
|
 |
Bottom of page |
|
clean_color_map(9r)
NAME
clean_color_map - Graphics: Cleans dirty colormap entries
SYNOPSIS
void (*ws_color_map_functions->clean_color_map)(
caddr_t colormap_handle );
ARGUMENTS
colormap_handle
Specifies the virtual address (handle) of device-specific information.
Typically this is a pointer to a private data structure that may
contain information such as the address of the hardware, state
information, and other information that may be shared between drivers.
The Workstation Subsystem allows separate handles for the cursor,
colormap, and the screen functions.
DESCRIPTION
The clean_color_map routine cleans any colormap entries found to be dirty
in the driver's colormap data structures, which are typically accessed
through the colormap_handle argument.
RETURN VALUES
None
EXAMPLES
The following code is from the Compaq implementation of clean_color_map in
the myvga example driver:
void
myvga_clean_color_map(caddr_t colormap_handle)
{
register struct myvga_type *scp =
(struct myvga_type *)colormap_handle;
register struct myvga_color_cell *entry;
register int i, s, lasti;
if (myvga_developer_debug)
printf("myvga_clean_color_map: entry\n");
if (!IS_MYVGA_DIRTY_CMAP(scp))
return;
/*
* No interrupts when using autoincrement mode of VDAC
*/
s = splbio();
/*
* Change the "dirty" colormap entries.
*/
entry = &scp->cells[scp->min_dirty];
lasti = -2;
for (i = scp->min_dirty; i <= scp->max_dirty ; i++, entry++)
{
if (entry->dirty_cell)
{
if (i != (lasti + 1))
OUTB(MYVGA_PEL_ADDR_WMODE, i);
OUTB(MYVGA_PEL_DATA, entry->red);
OUTB(MYVGA_PEL_DATA, entry->green);
OUTB(MYVGA_PEL_DATA, entry->blue);
entry->dirty_cell = 0;
lasti = i;
}
}
/*
* Reset to "clean" status
*/
scp->min_dirty = 256;
scp->max_dirty = 0;
CLR_MYVGA_DIRTY_CMAP(scp);
splx(s);
}
FILES
/usr/sys/include/sys/workstation.h
/usr/sys/include/sys/wsdevice.h
SEE ALSO
Data Structures: ws_color_map_functions(9s)
 |
Index for Section 9 |
|
 |
Alphabetical listing for C |
|
 |
Top of page |
|