[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2-demos] master 860a31e: [graph/x11] Miscellaneous clean-ups.
From: |
Alexei Podtelezhnikov |
Subject: |
[freetype2-demos] master 860a31e: [graph/x11] Miscellaneous clean-ups. |
Date: |
Tue, 16 Jun 2020 22:40:36 -0400 (EDT) |
branch: master
commit 860a31e2722c739e426323ae0bac5d91ff95f4eb
Author: Alexei Podtelezhnikov <apodtele@gmail.com>
Commit: Alexei Podtelezhnikov <apodtele@gmail.com>
[graph/x11] Miscellaneous clean-ups.
* graph/x11/grx11.c (gr_x11_surface_refresh_rect): Generate Expose
instead of `XPutImage'.
(gr_x11_blitter_reset): Signedness.
(gr_x11_surface_listen_event): Logging.
---
ChangeLog | 9 +++++++++
graph/x11/grx11.c | 23 ++++++-----------------
2 files changed, 15 insertions(+), 17 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index da043cf..00a068a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2020-06-16 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ [graph/x11] Miscellaneous clean-ups.
+
+ * graph/x11/grx11.c (gr_x11_surface_refresh_rect): Generate Expose
+ instead of `XPutImage'.
+ (gr_x11_blitter_reset): Signedness.
+ (gr_x11_surface_listen_event): Logging.
+
2020-06-12 Alexei Podtelezhnikov <apodtele@gmail.com>
[graph] Simplify X11 driver.
diff --git a/graph/x11/grx11.c b/graph/x11/grx11.c
index e7e17b9..2987efd 100644
--- a/graph/x11/grx11.c
+++ b/graph/x11/grx11.c
@@ -214,7 +214,7 @@ typedef unsigned long uint32;
pitch = blit->dst_pitch = target->bytes_per_line;
- blit->dst_line = target->data + y * pitch;
+ blit->dst_line = (unsigned char*)target->data + y * pitch;
if ( pitch < 0 )
blit->dst_line -= ( target->height - 1 ) * pitch;
@@ -1073,13 +1073,8 @@ typedef unsigned long uint32;
{
surface->convert( &blit );
- XPutImage( surface->display,
- surface->win,
- surface->gc,
- surface->ximage,
- blit.x, blit.y,
- blit.x, blit.y,
- (unsigned int)blit.width, (unsigned int)blit.height );
+ /* without background defined, this only generates Expose event */
+ XClearArea( surface->display, surface->win, x, y, w, h, True );
}
}
@@ -1240,8 +1235,9 @@ typedef unsigned long uint32;
break;
case Expose:
-#if 1
- /* we don't need to convert the bits on each expose! */
+ LOG(( "Expose (%lu): %dx%d\m", x_event.xexpose.serial,
+ x_event.xexpose.width, x_event.xexpose.height ));
+
XPutImage( surface->display,
surface->win,
surface->gc,
@@ -1252,13 +1248,6 @@ typedef unsigned long uint32;
x_event.xexpose.y,
(unsigned int)x_event.xexpose.width,
(unsigned int)x_event.xexpose.height );
-#else
- gr_x11_surface_refresh_rect( surface,
- x_event.xexpose.x,
- x_event.xexpose.y,
- x_event.xexpose.width,
- x_event.xexpose.height );
-#endif
break;
/* You should add more cases to handle mouse events, etc. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2-demos] master 860a31e: [graph/x11] Miscellaneous clean-ups.,
Alexei Podtelezhnikov <=