]> git.eshelyaron.com Git - emacs.git/commit
Implement native image rotation and cropping on cairo
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Sat, 8 Jun 2019 04:05:15 +0000 (13:05 +0900)
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Sat, 8 Jun 2019 04:05:15 +0000 (13:05 +0900)
commit88c49ac31898e7b2c29338ca55cae292c450f7be
tree6130d1732acceaf2eef70327acb724c14171934d
parent890a0826f3f68f4476f6ec0b56fe96c6bc047142
Implement native image rotation and cropping on cairo

* src/dispextern.h (struct image) [USE_CAIRO]:
* src/image.c (free_image, image_clear_image_1)
(image_set_crop, image_set_size, image_set_rotation)
(image_create_x_image_and_pixmap) [USE_CAIRO]: #ifdef out HAVE_XRENDER part.

* src/image.c (cr_create_surface_from_pix_containers) [USE_CAIRO]: Rename
from cr_create_surface_from_pix_containers.  Change arguments to pair of
Emacs_Pix_Container:s.  Move block_input and unblock_input to caller.
(cr_put_image_to_cr_data) [USE_CAIRO]: New function.
(prepare_image_for_display) [USE_CAIRO]: Use it.
(image_set_transform) [USE_CAIRO]: Create dummy solid color pattern equipped
with transformation matrix and set it to img->cr_data.

* src/xterm.c (fringe_bmp) [USE_CAIRO]: Change type to cairo_pattern_t **.
(x_cr_define_fringe_bitmap, x_cr_destroy_fringe_bitmap) [USE_CAIRO]: Create
or destroy cairo pattern.
(x_cr_draw_image) [USE_CAIRO]: Remove arguments image_width and image_height.
Change type of image to cairo pattern.  All callers changed.

* src/gtkutil.c (xg_get_image_for_pixmap) [USE_CAIRO]: Get cairo surface
from img->cr_data, which is of cairo pattern now.
src/dispextern.h
src/gtkutil.c
src/image.c
src/xterm.c