| /plan9/sys/src/cmd/gs/src/ |
| H A D | gxclist.c | 33 #define CLIST_IS_WRITER(cdev) ((cdev)->common.ymin < 0) argument 36 ENUM_PTRS_WITH(device_clist_enum_ptrs, gx_device_clist *cdev) 42 if (!CLIST_IS_WRITER(cdev)) 46 case 0: return ENUM_OBJ((cdev->writer.image_enum_id != gs_no_id ? 47 cdev->writer.clip_path : 0)); 48 case 1: return ENUM_OBJ((cdev->writer.image_enum_id != gs_no_id ? 49 cdev->writer.color_space.space : 0)); 51 return ENUM_USING(st_imager_state, &cdev->writer.imager_state, 56 RELOC_PTRS_WITH(device_clist_reloc_ptrs, gx_device_clist *cdev) in RELOC_PTRS_WITH() argument 59 if (!CLIST_IS_WRITER(cdev)) in RELOC_PTRS_WITH() [all …]
|
| H A D | gdevcgm.c | 108 gx_device_cgm *cdev = private_data; in cgm_gs_alloc() local 110 return gs_alloc_bytes(cdev->memory, size, "cgm_gs_alloc"); in cgm_gs_alloc() 115 gx_device_cgm *cdev = private_data; in cgm_gs_free() local 117 gs_free_object(cdev->memory, obj, "cgm_gs_free"); in cgm_gs_free() 145 gx_device_cgm *cdev = (gx_device_cgm *) dev; in cgm_open() local 152 cdev->file = fopen(cdev->fname, "wb"); in cgm_open() 153 if (cdev->file == 0) in cgm_open() 155 cal.private_data = cdev; in cgm_open() 158 cdev->st = cgm_initialize(cdev->file, &cal); in cgm_open() 159 if (cdev->st == 0) in cgm_open() [all …]
|
| H A D | gxclip2.c | 105 tile_clip_initialize(gx_device_tile_clip * cdev, const gx_strip_bitmap * tiles, in tile_clip_initialize() argument 109 gx_mask_clip_initialize(cdev, &gs_tile_clip_device, in tile_clip_initialize() 114 cdev->tiles = *tiles; in tile_clip_initialize() 115 tile_clip_set_phase(cdev, px, py); in tile_clip_initialize() 122 tile_clip_set_phase(gx_device_tile_clip * cdev, int px, int py) in tile_clip_set_phase() argument 124 cdev->phase.x = px; in tile_clip_set_phase() 125 cdev->phase.y = py; in tile_clip_set_phase() 133 gx_device_tile_clip *cdev = (gx_device_tile_clip *) dev; in tile_clip_fill_rectangle() local 134 gx_device *tdev = cdev->target; in tile_clip_fill_rectangle() 136 return (*dev_proc(tdev, strip_tile_rectangle)) (tdev, &cdev->tiles, in tile_clip_fill_rectangle() [all …]
|
| H A D | gxclipm.c | 107 gx_device_mask_clip *cdev = (gx_device_mask_clip *) dev; in mask_clip_fill_rectangle() local 108 gx_device *tdev = cdev->target; in mask_clip_fill_rectangle() 111 int mx0 = x + cdev->phase.x, my0 = y + cdev->phase.y; in mask_clip_fill_rectangle() 118 if (mx1 > cdev->tiles.size.x) in mask_clip_fill_rectangle() 119 mx1 = cdev->tiles.size.x; in mask_clip_fill_rectangle() 120 if (my1 > cdev->tiles.size.y) in mask_clip_fill_rectangle() 121 my1 = cdev->tiles.size.y; in mask_clip_fill_rectangle() 123 (tdev, cdev->tiles.data + my0 * cdev->tiles.raster, mx0, in mask_clip_fill_rectangle() 124 cdev->tiles.raster, cdev->tiles.id, in mask_clip_fill_rectangle() 125 mx0 - cdev->phase.x, my0 - cdev->phase.y, in mask_clip_fill_rectangle() [all …]
|
| H A D | gxmclip.c | 66 gx_mask_clip_initialize(gx_device_mask_clip * cdev, in gx_mask_clip_initialize() argument 75 gx_device_init((gx_device *)cdev, (const gx_device *)proto, in gx_mask_clip_initialize() 77 cdev->width = tdev->width; in gx_mask_clip_initialize() 78 cdev->height = tdev->height; in gx_mask_clip_initialize() 79 cdev->color_info = tdev->color_info; in gx_mask_clip_initialize() 80 gx_device_set_target((gx_device_forward *)cdev, tdev); in gx_mask_clip_initialize() 81 cdev->phase.x = -tx; in gx_mask_clip_initialize() 82 cdev->phase.y = -ty; in gx_mask_clip_initialize() 85 gs_make_mem_mono_device(&cdev->mdev, 0, 0); in gx_mask_clip_initialize() 92 cdev->mdev.base = 0; in gx_mask_clip_initialize() [all …]
|
| H A D | gxclimag.c | 64 gx_device_clist_writer * const cdev = in clist_fill_mask() local 83 if (depth > 1 && (cdev->disable_mask & clist_disable_copy_alpha) != 0) in clist_fill_mask() 95 if (((cdev->disable_mask & clist_disable_complex_clip) && in clist_fill_mask() 105 if (cmd_check_clip_path(cdev, pcpath)) in clist_fill_mask() 106 cmd_clear_known(cdev, clip_path_known); in clist_fill_mask() 113 code = cmd_update_lop(cdev, pcls, lop); in clist_fill_mask() 120 set_cmd_put_op(dp, cdev, pcls, cmd_opv_set_copy_alpha, 1); in clist_fill_mask() 125 code = cmd_do_write_unknown(cdev, pcls, clip_path_known); in clist_fill_mask() 127 code = cmd_do_enable_clip(cdev, pcls, pcpath != NULL); in clist_fill_mask() 130 code = cmd_put_drawing_color(cdev, pcls, pdcolor); in clist_fill_mask() [all …]
|
| H A D | gxclrect.c | 144 gx_device_clist_writer * const cdev = in clist_fill_rectangle() local 152 code = cmd_disable_lop(cdev, pcls); in clist_fill_rectangle() 154 code = cmd_put_color(cdev, pcls, &clist_select_color1, in clist_fill_rectangle() 157 code = cmd_write_rect_cmd(cdev, pcls, cmd_op_fill_rect, x, y, in clist_fill_rectangle() 169 gx_device_clist_writer * const cdev = in clist_strip_tile_rectangle() local 188 code = cmd_disable_lop(cdev, pcls); in clist_strip_tile_rectangle() 190 if (!cls_has_tile_id(cdev, pcls, tile->id, offset_temp)) { in clist_strip_tile_rectangle() 194 code = clist_change_tile(cdev, pcls, tile, depth); in clist_strip_tile_rectangle() 196 (code != gs_error_VMerror || !cdev->error_is_retryable)); in clist_strip_tile_rectangle() 213 code = cmd_set_tile_colors(cdev, pcls, color0, color1); in clist_strip_tile_rectangle() [all …]
|
| H A D | gxclread.c | 142 gx_device_clist_reader *cdev, 209 gx_device_clist_common *cdev = (gx_device_clist_common *)dev; in clist_get_bits_rectangle() local 252 code = gdev_create_buf_device(cdev->buf_procs.create_buf_device, in clist_get_bits_rectangle() 253 &bdev, cdev->target, &render_plane, in clist_get_bits_rectangle() 267 cdev->buf_procs.destroy_buf_device(bdev); in clist_get_bits_rectangle() 290 code = gdev_create_buf_device(cdev->buf_procs.create_buf_device, in clist_get_bits_rectangle() 291 &bdev, cdev->target, &render_plane, in clist_get_bits_rectangle() 319 cdev->buf_procs.destroy_buf_device(bdev); in clist_get_bits_rectangle() 331 gx_device_clist * const cdev = (gx_device_clist *)dev; in clist_rasterize_lines() local 332 gx_device_clist_reader * const crdev = &cdev->reader; in clist_rasterize_lines() [all …]
|
| H A D | gxcldev.h | 569 int band_height = cdev->page_band_height;\ 572 if (cdev->permanent_error < 0)\ 573 return (cdev->permanent_error);\ 576 gx_clist_state *pcls = cdev->states + band;\ 584 int band_height = cdev->page_band_height;\ 587 if (cdev->permanent_error < 0)\ 588 return (cdev->permanent_error);\ 591 gx_clist_state *pcls = cdev->states + band;\ 597 #define NEST_RECT ++cdev->driver_call_nesting; 598 #define UNNEST_RECT --cdev->driver_call_nesting [all …]
|
| H A D | gxclpath.c | 235 cmd_check_fill_known(gx_device_clist_writer *cdev, const gs_imager_state *pis, in cmd_check_fill_known() argument 251 if (cdev->imager_state.flatness != flatness) { in cmd_check_fill_known() 253 cdev->imager_state.flatness = flatness; in cmd_check_fill_known() 278 if (cdev->imager_state.fill_adjust.x != padjust->x || in cmd_check_fill_known() 279 cdev->imager_state.fill_adjust.y != padjust->y in cmd_check_fill_known() 282 cdev->imager_state.fill_adjust = *padjust; in cmd_check_fill_known() 284 if (cdev->imager_state.alpha != pis->alpha) { in cmd_check_fill_known() 288 if (cmd_check_clip_path(cdev, pcpath)) in cmd_check_fill_known() 570 gx_device_clist_writer * const cdev = in clist_fill_path() local 581 if ( (cdev->disable_mask & clist_disable_fill_path) || in clist_fill_path() [all …]
|
| H A D | zpcolor.c | 206 gx_device *cdev = gs_currentdevice_inline(igs); in pattern_paint_prepare() local 213 code = dev_proc(cdev, pattern_manage)(cdev, pinst->id, pinst, in pattern_paint_prepare() 232 pinst, cdev->color_info.depth); in pattern_paint_prepare() 262 code = dev_proc(cdev, pattern_manage)(cdev, pinst->id, pinst, in pattern_paint_prepare() 320 gx_device *cdev = gs_currentdevice_inline(igs); in pattern_paint_cleanup() local 321 int code1 = dev_proc(cdev, pattern_manage)(cdev, gx_no_bitmap_id, NULL, in pattern_paint_cleanup()
|
| H A D | gsropc.c | 168 gx_device_composite_rop *cdev; in c_rop_create_default_compositor() local 177 cdev = in c_rop_create_default_compositor() 181 *pcdev = (gx_device *) cdev; in c_rop_create_default_compositor() 182 if (cdev == 0) in c_rop_create_default_compositor() 184 gx_device_init((gx_device *)cdev, in c_rop_create_default_compositor() 186 gx_device_copy_params((gx_device *)cdev, dev); in c_rop_create_default_compositor() 192 gx_device_set_target((gx_device_forward *)cdev, dev); in c_rop_create_default_compositor() 193 cdev->params = prcte->params; in c_rop_create_default_compositor()
|
| H A D | gxmclip.h | 65 int gx_mask_clip_initialize(gx_device_mask_clip * cdev, 75 #define setup_mask_copy_mono(cdev, color, mcolor0, mcolor1)\ argument 77 if ( cdev->mdev.base == 0 ) {\
|
| H A D | gxclip2.h | 41 int tile_clip_initialize(gx_device_tile_clip * cdev, 50 void tile_clip_set_phase(gx_device_tile_clip * cdev, int px, int py);
|
| H A D | gsalphac.c | 270 gx_device_composite_alpha *cdev; in c_alpha_create_default_compositor() local 277 cdev = in c_alpha_create_default_compositor() 281 *pcdev = (gx_device *)cdev; in c_alpha_create_default_compositor() 282 if (cdev == 0) in c_alpha_create_default_compositor() 284 gx_device_init((gx_device *)cdev, in c_alpha_create_default_compositor() 286 gx_device_copy_params((gx_device *)cdev, dev); in c_alpha_create_default_compositor() 292 cdev->color_info.depth = in c_alpha_create_default_compositor() 295 cdev->color_info.max_gray = cdev->color_info.max_color = 255; in c_alpha_create_default_compositor() 297 cdev->color_info.dither_grays = cdev->color_info.dither_colors = 256; in c_alpha_create_default_compositor() 303 gx_device_set_target((gx_device_forward *)cdev, dev); in c_alpha_create_default_compositor() [all …]
|
| H A D | zdpnext.c | 87 gx_device *cdev; member 371 pcp->orig_dev = pcp->cdev = dev; /* for end_composite */ in begin_composite() 373 (dev, &pcp->cdev, pcp->pcte, (gs_imager_state *)igs, imemory); in begin_composite() 378 gs_setdevice_no_init(igs, pcp->cdev); in begin_composite() 387 if (pcp->cdev != pcp->orig_dev) { in end_composite() 388 gs_closedevice(pcp->cdev); /* also frees the device */ in end_composite()
|
| H A D | gxclpath.h | 221 (cdev->imager_state.member != pis->member) 223 (cdev->imager_state.member = pis->member)
|
| H A D | gxp1fill.c | 45 gx_device_tile_clip cdev; member 76 ptfs->pcdev = (gx_device *) & ptfs->cdev; in tile_fill_init() 91 return tile_clip_initialize(&ptfs->cdev, ptfs->tmask, dev, px, py, dev->memory); in tile_fill_init() 178 if (ptfs->pcdev == (gx_device *) & ptfs->cdev) in tile_by_steps() 179 tile_clip_set_phase(&ptfs->cdev, in tile_by_steps() 271 tile_clip_set_phase(&state.cdev, px, py); in gx_dc_pattern_fill_rectangle()
|
| H A D | gdevbbox.c | 1077 gx_device_clip cdev; in bbox_image_plane_data() local 1082 gx_make_clip_path_device(&cdev, pcpath); in bbox_image_plane_data() 1083 cdev.target = dev; in bbox_image_plane_data() 1084 (*dev_proc(&cdev, open_device)) ((gx_device *) & cdev); in bbox_image_plane_data() 1087 gx_default_fill_triangle((gx_device *) & cdev, x0, y0, in bbox_image_plane_data() 1091 gx_default_fill_triangle((gx_device *) & cdev, x0, y0, in bbox_image_plane_data() 1188 gx_device *cdev; in bbox_create_compositor() local 1191 (target, &cdev, pcte, pis, memory); in bbox_create_compositor() 1194 if (code < 0 || target == cdev) { in bbox_create_compositor() 1202 (*dev_proc(cdev, close_device)) (cdev); in bbox_create_compositor() [all …]
|
| H A D | gxipixel.c | 585 gx_device_clip *cdev = in gx_image_enum_begin() local 589 if (cdev == 0) { in gx_image_enum_begin() 595 gx_make_clip_translate_device(cdev, gx_cpath_list(pcpath), 0, 0, mem); in gx_image_enum_begin() 596 gx_device_retain((gx_device *)cdev, true); /* will free explicitly */ in gx_image_enum_begin() 597 gx_device_set_target((gx_device_forward *)cdev, dev); in gx_image_enum_begin() 598 (*dev_proc(cdev, open_device)) ((gx_device *) cdev); in gx_image_enum_begin() 599 penum->clip_dev = cdev; in gx_image_enum_begin()
|
| H A D | gxclrast.c | 196 gx_device_clist_reader *cdev, gs_memory_t *mem); 206 gx_device_clist_reader *cdev, 209 gx_device_clist_reader *cdev, 235 gx_device_clist_reader *cdev, stream *s, in clist_playback_band() argument 337 cbox.q.x = cdev->width; in clist_playback_band() 338 cbox.q.y = cdev->height; in clist_playback_band() 425 cdev, mem); in clist_playback_band() 556 dev_depth = cdev->color_info.depth; in clist_playback_band() 631 dev_depth = cdev->color_info.depth; in clist_playback_band() 695 depth = cdev->color_info.depth; in clist_playback_band() [all …]
|
| H A D | gxccache.c | 257 gx_device_clip cdev; in gx_image_cached_char() local 294 imaging_dev != (gx_device *) & cdev /* might be 2nd time around */ in gx_image_cached_char() 306 gx_make_clip_device(&cdev, gx_cpath_list(pcpath)); in gx_image_cached_char() 307 cdev.target = imaging_dev; in gx_image_cached_char() 308 imaging_dev = (gx_device *) & cdev; in gx_image_cached_char()
|
| H A D | gxcomp.h | 122 int proc(gs_composite_t * pcte, gx_device * cdev, gx_device * tdev,\
|
| /plan9/sys/src/cmd/cwfs/ |
| H A D | cw.c | 46 Device* cdev; member 174 p = getbuf(cw->cdev, CACHE_ADDR, Brd|Bres); in cmd_statw() 221 p = getbuf(cw->cdev, hmaddr + m/BKPERBLK, Brd); in cmd_statw() 261 cb = getbuf(cw->cdev, CACHE_ADDR, Brd|Bres); in dumpblock() 274 p = getbuf(cw->cdev, maddr + a/BKPERBLK, Brd); in dumpblock() 317 if(count > 10 || devread(cw->cdev, a, p1->iobuf)) in dumpblock() 358 cb = getbuf(cw->cdev, CACHE_ADDR, Brd|Bmod|Bres); in dumpblock() 406 cw->cdev = CDEV(dev); in cwinit1() 410 devinit(cw->cdev); in cwinit1() 426 cb = getbuf(cw->cdev, CACHE_ADDR, Brd|Bmod|Bres); in cwinit() [all …]
|
| /plan9/sys/src/9/port/ |
| H A D | cache.c | 281 cdev(Mntcache *m, Chan *c) in cdev() function 314 if(cdev(m, c) == 0) { in cread() 484 if(cdev(m, c) == 0) { in cupdate() 576 if(cdev(m, c) == 0) { in cwrite()
|