summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-01-26 06:05:35 +0000
committerPo Lu <luangruo@yahoo.com>2022-01-26 06:05:35 +0000
commita2eb83d037b36f43a124426a120af432b94b5b4e (patch)
tree07d2cd93d0b4f9e3c63ad4e3b7513045af8933da /src
parent401ccb0b9c697fd3af026a72b6621a692e206aea (diff)
downloademacs-a2eb83d037b36f43a124426a120af432b94b5b4e.tar.gz
emacs-a2eb83d037b36f43a124426a120af432b94b5b4e.tar.bz2
emacs-a2eb83d037b36f43a124426a120af432b94b5b4e.zip
Simplify Haiku scrolling code
* src/haikuterm.c (haiku_scroll_run): Remove code that can never be reached since Cairo frames are always double buffered.
Diffstat (limited to 'src')
-rw-r--r--src/haikuterm.c46
1 files changed, 5 insertions, 41 deletions
diff --git a/src/haikuterm.c b/src/haikuterm.c
index 90d6f926c82..b9eb1d2fc5e 100644
--- a/src/haikuterm.c
+++ b/src/haikuterm.c
@@ -2325,50 +2325,14 @@ haiku_scroll_run (struct window *w, struct run *run)
height = run->height;
}
- if (!height)
- return;
-
block_input ();
gui_clear_cursor (w);
+
BView_draw_lock (view);
-#ifdef USE_BE_CAIRO
- if (EmacsView_double_buffered_p (view))
- {
-#endif
- BView_StartClip (view);
- BView_CopyBits (view, x, from_y, width, height,
- x, to_y, width, height);
- BView_EndClip (view);
-#ifdef USE_BE_CAIRO
- }
- else
- {
- EmacsWindow_begin_cr_critical_section (FRAME_HAIKU_WINDOW (f));
- cairo_surface_t *surface = FRAME_CR_SURFACE (f);
- cairo_surface_t *s
- = cairo_surface_create_similar (surface,
- cairo_surface_get_content (surface),
- width, height);
- cairo_t *cr = cairo_create (s);
- if (surface)
- {
- cairo_set_source_surface (cr, surface, -x, -from_y);
- cairo_paint (cr);
- cairo_destroy (cr);
-
- cr = haiku_begin_cr_clip (f, NULL);
- cairo_save (cr);
- cairo_set_source_surface (cr, s, x, to_y);
- cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
- cairo_rectangle (cr, x, to_y, width, height);
- cairo_fill (cr);
- cairo_restore (cr);
- cairo_surface_destroy (s);
- haiku_end_cr_clip (cr);
- }
- EmacsWindow_end_cr_critical_section (FRAME_HAIKU_WINDOW (f));
- }
-#endif
+ BView_StartClip (view);
+ BView_CopyBits (view, x, from_y, width, height,
+ x, to_y, width, height);
+ BView_EndClip (view);
BView_draw_unlock (view);
unblock_input ();