Home
last modified time | relevance | path

Searched refs:mdev (Results 1 – 25 of 52) sorted by relevance

123

/plan9/sys/src/cmd/gs/src/
H A Dgdevmac.c103 gx_device_macos * mdev = (gx_device_macos *)dev; in mac_open() local
124 mac_set_colordepth(dev, mdev->color_info.depth); in mac_open()
126 mdev->numUsedFonts = 0; in mac_open()
127 mdev->lastFontFace = -1; in mac_open()
128 mdev->lastFontSize = -1; in mac_open()
129 mdev->lastFontID = -1; in mac_open()
131 mdev->pic = (PicHandle) NewHandle(500000); in mac_open()
132 if (mdev->pic == 0) // error, not enough memory in mac_open()
135 HLockHi((Handle) mdev->pic); // move handle high and lock it in mac_open()
137 mdev->currPicPos = (short*) *mdev->pic; in mac_open()
[all …]
H A Dgdevmpla.c46 gdev_mem_set_planar(gx_device_memory * mdev, int num_planes, in gdev_mem_set_planar() argument
72 if (total_depth > mdev->color_info.depth) in gdev_mem_set_planar()
74 mdev->num_planes = num_planes; in gdev_mem_set_planar()
75 memcpy(mdev->planes, planes, num_planes * sizeof(planes[0])); in gdev_mem_set_planar()
76 mdev->plane_depth = same_depth; in gdev_mem_set_planar()
78 set_dev_proc(mdev, open_device, mem_planar_open); in gdev_mem_set_planar()
79 set_dev_proc(mdev, fill_rectangle, mem_planar_fill_rectangle); in gdev_mem_set_planar()
80 set_dev_proc(mdev, copy_mono, mem_planar_copy_mono); in gdev_mem_set_planar()
81 set_dev_proc(mdev, copy_color, mem_planar_copy_color); in gdev_mem_set_planar()
82 set_dev_proc(mdev, copy_alpha, gx_default_copy_alpha); in gdev_mem_set_planar()
[all …]
H A Dgdevmem.c289 gx_device_memory *const mdev = (gx_device_memory *)dev; in mem_open() local
292 if (mdev->num_planes) in mem_open()
294 return gdev_mem_open_scan_lines(mdev, dev->height); in mem_open()
297 gdev_mem_open_scan_lines(gx_device_memory *mdev, int setup_height) in gdev_mem_open_scan_lines() argument
301 if (setup_height < 0 || setup_height > mdev->height) in gdev_mem_open_scan_lines()
303 if (mdev->bitmap_memory != 0) { in gdev_mem_open_scan_lines()
305 ulong size = gdev_mem_bitmap_size(mdev); in gdev_mem_open_scan_lines()
309 mdev->base = gs_alloc_bytes(mdev->bitmap_memory, (uint)size, in gdev_mem_open_scan_lines()
311 if (mdev->base == 0) in gdev_mem_open_scan_lines()
313 mdev->foreign_bits = false; in gdev_mem_open_scan_lines()
[all …]
H A Dgxmclip.c36 return ENUM_USING(st_device_memory, &mcdev->mdev, in ENUM_PTRS_WITH()
37 sizeof(mcdev->mdev), index); in ENUM_PTRS_WITH()
46 RELOC_USING(st_device_memory, &mcdev->mdev, sizeof(mcdev->mdev)); in RELOC_PTRS_WITH()
47 if (mcdev->mdev.base != 0) { in RELOC_PTRS_WITH()
55 for (i = 0; i < mcdev->mdev.height; ++i) in RELOC_PTRS_WITH()
56 mcdev->mdev.line_ptrs[i] += diff; in RELOC_PTRS_WITH()
57 mcdev->mdev.base = mcdev->mdev.line_ptrs[0]; in RELOC_PTRS_WITH()
58 mcdev->mdev.line_ptrs = in RELOC_PTRS_WITH()
59 (void *)((char *)(mcdev->mdev.line_ptrs) + diff); in RELOC_PTRS_WITH()
85 gs_make_mem_mono_device(&cdev->mdev, 0, 0); in gx_mask_clip_initialize()
[all …]
H A Dgdevabuf.c63 gx_device_memory * const mdev = (gx_device_memory *)dev; in mem_alpha_map_rgb_color() local
67 (gx_color_index) ((1 << mdev->log2_alpha_bits) - 1)); in mem_alpha_map_rgb_color()
82 gx_device_memory * const mdev = (gx_device_memory *)dev; in mem_alpha_map_rgb_alpha_color() local
91 mdev->log2_alpha_bits))); in mem_alpha_map_rgb_alpha_color()
249 gx_device_memory * const mdev = (gx_device_memory *)dev; in mem_abuf_close() local
250 int code = abuf_flush(mdev); in mem_abuf_close()
270 gx_device_memory * const mdev = (gx_device_memory *)dev; in y_transfer_init() local
271 int bh = 1 << mdev->log2_scale.y; in y_transfer_init()
273 if (ty < mdev->mapped_y || ty > mdev->mapped_y + mdev->mapped_height) { in y_transfer_init()
274 abuf_flush(mdev); in y_transfer_init()
[all …]
H A Dgdevmac.h123 long offset = (long) mdev->currPicPos - (long) *mdev->pic; \
124 long len = GetHandleSize((Handle) mdev->pic); \
126 HUnlock((Handle) mdev->pic); \
127 SetHandleSize((Handle) mdev->pic, len + b); \
129 HLockHi((Handle) mdev->pic); \
130 mdev->currPicPos = (short*) ((long) *mdev->pic + offset); \
136 if (mdev->outputPage) { \
137 mdev->outputPage = false; \
138 mdev->currPicPos = (short*) *mdev->pic; \
139 mdev->currPicPos += 42; /* header len */ \
[all …]
H A Dgxdevmem.h183 ulong gdev_mem_bits_size(const gx_device_memory *mdev, int width,
186 ulong gdev_mem_line_ptrs_size(const gx_device_memory *mdev, int width,
189 ulong gdev_mem_data_size(const gx_device_memory *mdev, int width,
192 #define gdev_mem_bitmap_size(mdev)\ argument
193 gdev_mem_data_size(mdev, (mdev)->width, (mdev)->height)
205 #define gdev_mem_raster(mdev)\ argument
206 gx_device_raster((const gx_device *)(mdev), true)
221 void gs_make_mem_mono_device(gx_device_memory * mdev, gs_memory_t * mem,
223 void gs_make_mem_device(gx_device_memory * mdev,
238 int gdev_mem_open_scan_lines(gx_device_memory *mdev, int setup_height);
[all …]
H A Dgdevm56.c83 mdev->color56.abcd = abcd = (color) >> 24, \
84 mdev->color56.bcde = bcde = (abcd << 8) | (e),\
85 mdev->color56.cdef = cdef = (bcde << 8) | (f),\
86 mdev->color56.defg = defg = (cdef << 8) | (g),\
87 mdev->color56.efga = efga = (defg << 8) | (a),\
88 mdev->color56.fgab = fgab = (efga << 8) | (b),\
89 mdev->color56.gabc = gabc = (fgab << 8) | (c),\
90 mdev->color56.abcdefg = (color)
93 mdev->color56.abcd = abcd =\
96 mdev->color56.gabc = gabc = (abcd << 8) | (g),\
[all …]
H A Dgdevm40.c80 mdev->color40.abcd = abcd = (color) >> 8, \
81 mdev->color40.bcde = bcde = (abcd << 8) | (e),\
82 mdev->color40.cdea = cdea = (bcde << 8) | (a),\
83 mdev->color40.deab = deab = (cdea << 8) | (b),\
84 mdev->color40.eabc = eabc = (deab << 8) | (c),\
85 mdev->color40.abcde = (color)
88 mdev->color40.abcd = abcd =\
91 mdev->color40.eabc = eabc = (abcd << 8) | (e),\
92 mdev->color40.deab = deab = (eabc << 8) | (d),\
93 mdev->color40.cdea = cdea = (deab << 8) | (c),\
[all …]
H A Dgdevpdfd.c480 return cvd->std_fill_rectangle((gx_device *)&cvd->mdev, in lcvd_fill_rectangle_shifted()
481 x - cvd->mdev.mapped_x, y - cvd->mdev.mapped_y, width, height, color); in lcvd_fill_rectangle_shifted()
490 x - cvd->mdev.mapped_x, y - cvd->mdev.mapped_y, width, height, (gx_color_index)1); in lcvd_fill_rectangle_shifted2()
493 return cvd->std_fill_rectangle((gx_device *)&cvd->mdev, in lcvd_fill_rectangle_shifted2()
494 x - cvd->mdev.mapped_x, y - cvd->mdev.mapped_y, width, height, color); in lcvd_fill_rectangle_shifted2()
501 return cvd->std_fill_rectangle((gx_device *)&cvd->mdev, in lcvd_fill_rectangle_shifted_from_mdev()
502 x - cvd->mdev.mapped_x, y - cvd->mdev.mapped_y, width, height, color); in lcvd_fill_rectangle_shifted_from_mdev()
507 gx_device_memory *mdev = (gx_device_memory *)dev; in lcvd_get_clipping_box_from_target() local
509 (*dev_proc(mdev->target, get_clipping_box))(mdev->target, pbox); in lcvd_get_clipping_box_from_target()
527 code1 = cvd->std_close_device((gx_device *)&cvd->mdev); in lcvd_close_device_with_writing()
[all …]
H A Dgdevm8.c51 gx_device_memory * const mdev = (gx_device_memory *)dev; in mem_mapped8_fill_rectangle() local
54 bytes_fill_rectangle(scan_line_base(mdev, y) + x, mdev->raster, in mem_mapped8_fill_rectangle()
72 gx_device_memory * const mdev = (gx_device_memory *)dev; in mem_mapped8_copy_mono() local
152 gx_device_memory * const mdev = (gx_device_memory *)dev; in mem_mapped8_copy_color() local
155 mem_copy_byte_rect(mdev, base, sourcex, sraster, x, y, w, h); in mem_mapped8_copy_color()
182 gx_device_memory * const mdev = (gx_device_memory *)dev; in mem8_word_fill_rectangle() local
187 base = scan_line_base(mdev, y); in mem8_word_fill_rectangle()
188 raster = mdev->raster; in mem8_word_fill_rectangle()
201 gx_device_memory * const mdev = (gx_device_memory *)dev; in mem8_word_copy_mono() local
207 row = scan_line_base(mdev, y); in mem8_word_copy_mono()
[all …]
H A Dgdevdrop.c107 gx_device_memory mdev; in gx_default_strip_copy_rop() local
135 gs_make_mem_device(&mdev, mdproto, mem, -1, dev); in gx_default_strip_copy_rop()
136 gx_device_retain((gx_device *)&mdev, true); /* prevent freeing */ in gx_default_strip_copy_rop()
137 mdev.width = width; in gx_default_strip_copy_rop()
138 mdev.height = block_height; in gx_default_strip_copy_rop()
139 mdev.bitmap_memory = mem; in gx_default_strip_copy_rop()
140 mdev.color_info = dev->color_info; in gx_default_strip_copy_rop()
141 code = (*dev_proc(&mdev, open_device))((gx_device *)&mdev); in gx_default_strip_copy_rop()
171 code = (*dev_proc(&mdev, copy_color)) in gx_default_strip_copy_rop()
172 ((gx_device *)&mdev, bit_params.data[0], bit_params.x_offset, in gx_default_strip_copy_rop()
[all …]
H A Dgdevmacxf.c274 gx_device_macos * mdev = (gx_device_macos*) macxf->dev; in mac_render_char() local
285 GSSetFgCol(macxf->dev, mdev->currPicPos, color); in mac_render_char()
288 for (i=0; i<mdev->numUsedFonts; i++) in mac_render_char()
289 if (mdev->usedFontIDs[i] == macxf->fontID) found = 1; in mac_render_char()
292 mdev->usedFontIDs[mdev->numUsedFonts++] = macxf->fontID; in mac_render_char()
293 PICT_fontName(mdev->currPicPos, macxf->fontID, macxf->fontName); in mac_render_char()
295 if (mdev->lastFontID != macxf->fontID) { in mac_render_char()
296 PICT_TxFont(mdev->currPicPos, macxf->fontID); in mac_render_char()
297 mdev->lastFontID = macxf->fontID; in mac_render_char()
299 if (mdev->lastFontSize != macxf->fontSize) { in mac_render_char()
[all …]
H A Dgdevm48.c81 mdev->color48.abcd = abcd = (color) >> 16, \
82 mdev->color48.cdef = cdef = (abcd << 16) | ((e) <<8) | (f),\
83 mdev->color48.efab = efab = (cdef << 16) | ((a) <<8) | (b),\
84 mdev->color48.abcdef = (color)
87 mdev->color48.abcd = abcd =\
90 mdev->color48.efab = efab = (abcd << 16) | ((f) <<8) | (e),\
91 mdev->color48.cdef = cdef = (efab << 16) | ((d) <<8) | (c),\
92 mdev->color48.abcdef = (color)
100 gx_device_memory * const mdev = (gx_device_memory *)dev; in mem_true48_fill_rectangle() local
131 if (mdev->color48.abcdef == color) { in mem_true48_fill_rectangle()
[all …]
H A Dgdevwdib.c74 gx_device_memory mdev; member
183 #define wmdev ((gx_device *)&wdev->mdev)
184 #define wmproc(proc) (*dev_proc(&wdev->mdev, proc))
306 if (!dev || !dev->is_open || dev->mdev.width == 0 || dev->mdev.height == 0) in gsdll_copy_dib()
318 if (!dev || !dev->is_open || dev->mdev.width == 0 || dev->mdev.height == 0) in gsdll_copy_palette()
335 if (!dev || !dev->is_open || dev->mdev.width == 0 || dev->mdev.height == 0) in gsdll_draw()
368 bmi.h.biWidth = wdev->mdev.width; in win_dib_repaint()
408 if (wdev->mdev.raster > 0) { /* just in case! */ in win_dib_repaint()
409 long ny = max_transfer / wdev->mdev.raster; in win_dib_repaint()
414 wdev->mdev.line_ptrs[wdev->height - (sy + ny)], in win_dib_repaint()
[all …]
H A Dgdevppla.c76 gdev_prn_set_planar(gx_device_memory *mdev, const gx_device *tdev) in gdev_prn_set_planar() argument
94 return gdev_mem_set_planar(mdev, num_comp, planes); in gdev_prn_set_planar()
120 gx_device_memory mdev; in gdev_prn_size_buf_planar() local
125 mdev.color_info = target->color_info; in gdev_prn_size_buf_planar()
126 gdev_prn_set_planar(&mdev, target); in gdev_prn_size_buf_planar()
127 space->bits = gdev_mem_bits_size(&mdev, target->width, height); in gdev_prn_size_buf_planar()
128 space->line_ptrs = gdev_mem_line_ptrs_size(&mdev, target->width, height); in gdev_prn_size_buf_planar()
129 space->raster = bitmap_raster(target->width * mdev.planes[0].depth); in gdev_prn_size_buf_planar()
H A Dgdevm24.c91 mdev->color24.rgbr = rgbr = ((bits32)(crgb) << 8) | (r),\
92 mdev->color24.gbrg = gbrg = (rgbr << 8) | (g),\
93 mdev->color24.brgb = brgb = (gbrg << 8) | (b),\
94 mdev->color24.rgb = (crgb)
97 mdev->color24.rgbr = rgbr =\
100 mdev->color24.brgb = brgb = (rgbr << 8) | (b),\
101 mdev->color24.gbrg = gbrg = (brgb << 8) | (g),\
102 mdev->color24.rgb = (crgb)
110 gx_device_memory * const mdev = (gx_device_memory *)dev; in mem_true24_fill_rectangle() local
195 if (mdev->color24.rgb == color) { in mem_true24_fill_rectangle()
[all …]
H A Dgdevmr1.c47 gx_device_memory *mdev = (gx_device_memory *) dev; in mem_mono_strip_copy_rop() local
51 uint draster = mdev->raster; in mem_mono_strip_copy_rop()
60 if (mdev->palette.data == 0) { in mem_mono_strip_copy_rop()
63 gdev_mem_mono_set_inverted(mdev, in mem_mono_strip_copy_rop()
67 invert = mdev->palette.data[0] != 0; in mem_mono_strip_copy_rop()
76 debug_dump_bitmap(scan_line_base(mdev, y), mdev->raster, in mem_mono_strip_copy_rop()
143 sdata = scan_line_base(mdev, 0); in mem_mono_strip_copy_rop()
173 no_texture.data = scan_line_base(mdev, 0); /* arbitrary */ in mem_mono_strip_copy_rop()
207 sdata = mdev->base; /* arbitrary, as long as all */ in mem_mono_strip_copy_rop()
224 drow = scan_line_base(mdev, y); in mem_mono_strip_copy_rop()
[all …]
H A Dgspaint.c205 gx_device_memory *mdev; in alpha_buffer_init() local
220 mdev = gs_alloc_struct(mem, gx_device_memory, &st_device_memory, in alpha_buffer_init()
222 if (mdev == 0) in alpha_buffer_init()
224 gs_make_mem_abuf_device(mdev, mem, dev, &log2_scale, in alpha_buffer_init()
226 mdev->width = width; in alpha_buffer_init()
227 mdev->height = height; in alpha_buffer_init()
228 mdev->bitmap_memory = mem; in alpha_buffer_init()
229 if ((*dev_proc(mdev, open_device)) ((gx_device *) mdev) < 0) { in alpha_buffer_init()
231 gs_free_object(mem, mdev, "alpha_buffer_init"); in alpha_buffer_init()
234 gx_set_device_only(pgs, (gx_device *) mdev); in alpha_buffer_init()
[all …]
H A Dgdevprn.c995 gx_device_memory *mdev; in gx_default_create_buf_device() local
1006 mdev = gs_alloc_struct(mem, gx_device_memory, &st_device_memory, in gx_default_create_buf_device()
1008 if (mdev == 0) in gx_default_create_buf_device()
1011 mdev = (gx_device_memory *)*pbdev; in gx_default_create_buf_device()
1013 if (target == (gx_device *)mdev) { in gx_default_create_buf_device()
1015 assign_dev_procs(mdev, mdproto); in gx_default_create_buf_device()
1016 check_device_separable((gx_device *)mdev); in gx_default_create_buf_device()
1017 gx_device_fill_in_procs((gx_device *)mdev); in gx_default_create_buf_device()
1019 gs_make_mem_device(mdev, mdproto, mem, (for_band ? 1 : 0), in gx_default_create_buf_device()
1020 (target == (gx_device *)mdev ? NULL : target)); in gx_default_create_buf_device()
[all …]
H A Dgdevpnga.c759 pnga_mark_device *mdev; in pnga_get_marking_device() local
760 int code = gs_copydevice((gx_device **)&mdev, in pnga_get_marking_device()
767 check_device_separable((gx_device *)mdev); in pnga_get_marking_device()
768 gx_device_fill_in_procs((gx_device *)mdev); in pnga_get_marking_device()
769 mdev->pnga_dev = pdev; in pnga_get_marking_device()
770 mdev->opacity = pis->opacity.alpha; in pnga_get_marking_device()
771 mdev->shape = pis->shape.alpha; in pnga_get_marking_device()
772 mdev->alpha = pis->opacity.alpha * pis->shape.alpha; in pnga_get_marking_device()
773 mdev->blend_mode = pis->blend_mode; in pnga_get_marking_device()
776 fill_dev_proc((gx_device *)mdev, fill_rectangle, in pnga_get_marking_device()
[all …]
H A Dgdevm2.c55 gx_device_memory * const mdev = (gx_device_memory *)dev; in mem_mapped2_fill_rectangle() local
58 bits_fill_rectangle(scan_line_base(mdev, y), x << 1, mdev->raster, in mem_mapped2_fill_rectangle()
70 gx_device_memory * const mdev = (gx_device_memory *)dev; in mem_mapped2_copy_mono() local
194 gx_device_memory * const mdev = (gx_device_memory *)dev; in mem2_word_fill_rectangle() local
199 base = scan_line_base(mdev, y); in mem2_word_fill_rectangle()
200 raster = mdev->raster; in mem2_word_fill_rectangle()
215 gx_device_memory * const mdev = (gx_device_memory *)dev; in mem2_word_copy_mono() local
221 row = scan_line_base(mdev, y); in mem2_word_copy_mono()
222 raster = mdev->raster; in mem2_word_copy_mono()
H A Dgdevm4.c59 gx_device_memory * const mdev = (gx_device_memory *)dev; in mem_mapped4_fill_rectangle() local
62 bits_fill_rectangle(scan_line_base(mdev, y), x << 2, mdev->raster, in mem_mapped4_fill_rectangle()
73 gx_device_memory * const mdev = (gx_device_memory *)dev; in mem_mapped4_copy_mono() local
253 gx_device_memory * const mdev = (gx_device_memory *)dev; in mem4_word_fill_rectangle() local
258 base = scan_line_base(mdev, y); in mem4_word_fill_rectangle()
259 raster = mdev->raster; in mem4_word_fill_rectangle()
273 gx_device_memory * const mdev = (gx_device_memory *)dev; in mem4_word_copy_mono() local
279 row = scan_line_base(mdev, y); in mem4_word_copy_mono()
280 raster = mdev->raster; in mem4_word_copy_mono()
H A Dgdevdsp.c169 if (ddev->mdev) {
170 return ENUM_OBJ(gx_device_enum_ptr((gx_device *)ddev->mdev));
182 if (ddev->mdev) {
183 ddev->mdev = (gx_device_memory *)
184 gx_device_reloc_ptr((gx_device *)ddev->mdev, gcst);
239 ddev->mdev = NULL; in display_open()
280 ddev->mdev->base); in display_open()
713 dev_proc(ddev->mdev, fill_rectangle)((gx_device *)ddev->mdev, in display_fill_rectangle()
730 dev_proc(ddev->mdev, copy_mono)((gx_device *)ddev->mdev, in display_copy_mono()
746 dev_proc(ddev->mdev, copy_color)((gx_device *)ddev->mdev, in display_copy_color()
[all …]
H A Dgdevm64.c91 gx_device_memory * const mdev = (gx_device_memory *)dev; in mem_true64_fill_rectangle() local
213 gx_device_memory * const mdev = (gx_device_memory *)dev; in mem_true64_copy_mono() local
330 gx_device_memory * const mdev = (gx_device_memory *)dev; in mem_true64_copy_color() local
333 mem_copy_byte_rect(mdev, base, sourcex, sraster, x, y, w, h); in mem_true64_copy_color()
360 gx_device_memory * const mdev = (gx_device_memory *)dev; in mem64_word_fill_rectangle() local
365 base = scan_line_base(mdev, y); in mem64_word_fill_rectangle()
366 raster = mdev->raster; in mem64_word_fill_rectangle()
379 gx_device_memory * const mdev = (gx_device_memory *)dev; in mem64_word_copy_mono() local
385 row = scan_line_base(mdev, y); in mem64_word_copy_mono()
386 raster = mdev->raster; in mem64_word_copy_mono()
[all …]

123