Wez Furlong
29095f8560
software: remove a little bit of overhead from draw_image
2019-09-30 08:36:23 -07:00
Wez Furlong
b2212c3105
software: improve alpha blending for draw_line
2019-09-30 08:17:47 -07:00
Wez Furlong
b5e07005b7
software: fix aligment check
2019-09-30 07:52:31 -07:00
Wez Furlong
b0efba9300
improve linear f32 -> srgb8 conversion
...
This uses a combination of lookup tables and simd to reduce the
cpu utilization by about ~15% compared to the prior brute force
implementation.
2019-09-30 00:45:35 -07:00
Wez Furlong
07fcc96f5a
window: disable alignment based optimization for fill_pixel
2019-09-29 20:59:20 -07:00
Wez Furlong
1e25003cb6
speed up rgb conversion from u8 -> linear f32
2019-09-29 20:52:47 -07:00
Wez Furlong
c6fd88d8c5
add basic simd support for clearing rectangles
2019-09-29 20:24:26 -07:00
Wez Furlong
569408de66
software: handle OutOfTextureSpace condition
2019-09-29 12:42:51 -07:00
Wez Furlong
91e6bb4a5a
rustfmt
2019-09-29 12:29:34 -07:00
Wez Furlong
99579bfca2
make it possible to build async example on stable rust
...
This should make the CI a bit happier
2019-09-28 22:00:07 -07:00
Wez Furlong
1c5f20f5e5
window: impl close for Windows
2019-09-28 21:16:08 -07:00
Wez Furlong
d44f380a82
window: impl close method on x11
2019-09-28 21:01:18 -07:00
Wez Furlong
950a7d2b22
cargo fix dyn
2019-09-28 20:29:48 -07:00
Wez Furlong
7e09492606
Add close operation on macos
2019-09-28 17:46:43 -07:00
Wez Furlong
dd1621e693
window: fixup mouse coords on macos hidpi display
2019-09-28 10:29:47 -07:00
Wez Furlong
389c477b16
software: ligatures now render, but scaled emoji need work
2019-09-28 10:06:47 -07:00
Wez Furlong
a9621170f7
window: on macos, query the dpi and improve resize/scaling handling
2019-09-28 09:01:14 -07:00
Wez Furlong
3a49b79ec6
basic timer list for x11 in software front end
2019-09-24 09:29:28 -07:00
Wez Furlong
67d6e7fd1a
window: cache window bitmap between paint calls
...
Without this, apps that only render invalidated portions of the screen
will render blank areas for the rest of the screen!
2019-09-23 08:03:23 -07:00
Wez Furlong
b0dd3a3803
fixup basic example for Point changes
2019-09-23 08:01:27 -07:00
Wez Furlong
c1c61974f8
implement timers for windows
2019-09-23 07:36:59 -07:00
Wez Furlong
4a742ea56b
(almost) fixup compilation for windows
2019-09-23 06:48:47 -07:00
Wez Furlong
8e38f34b6d
fix a couple of warnings
2019-09-22 21:02:02 -07:00
Wez Furlong
ed90a1487d
scroll wheel events on macos
2019-09-22 15:51:33 -07:00
Wez Furlong
ec280a54f8
incomplete but functional key input for software frontend
2019-09-22 10:25:31 -07:00
Wez Furlong
68f81e23f7
software render can now render basic glyphs
2019-09-22 08:12:52 -07:00
Wez Furlong
f17824994f
window: add basic timer functionality
...
We need this to poll the model and invalidate the gui so that it
can repaint as the child process emits output
2019-09-21 22:16:27 -07:00
Wez Furlong
0d7d438270
separate Sprite and SpriteSlice impls
2019-09-21 14:25:12 -07:00
Wez Furlong
fb5cbb5827
fixup x11 build for euclid point/rect changes
2019-09-21 13:33:21 -07:00
Wez Furlong
709990b9e7
use euclid crate for point/rect
2019-09-21 13:05:50 -07:00
Wez Furlong
c7c25025ed
upgrade euclid dep
2019-09-21 12:32:21 -07:00
Wez Furlong
3dce78bd9c
copy and adapt our opengl texture atlas code for the window crate
2019-09-21 09:00:08 -07:00
Wez Furlong
1950843de4
these rect methods should have been public
2019-09-21 08:03:14 -07:00
Wez Furlong
4e62b59628
rediscover the Rect type for x11 and consolidate
2019-09-21 08:01:31 -07:00
Wez Furlong
050dde6b4f
clean up draw_image api
2019-09-21 07:44:28 -07:00
Wez Furlong
896586809f
add Rect::bottom_right
2019-09-21 07:31:44 -07:00
Wez Furlong
6d902d8a39
introduce a Rect type
2019-09-21 00:19:31 -07:00
Wez Furlong
1c8ba615f3
fix build on macos
2019-09-15 19:09:08 -07:00
Wez Furlong
ce102d36b3
improve conditional use statements
2019-09-15 19:09:08 -07:00
Wez Furlong
fa54f02b27
fixup macos compilation
2019-09-15 19:09:08 -07:00
Wez Furlong
96c9633539
on windows, the windows map Mutex -> RefCell
2019-09-15 19:09:08 -07:00
Wez Furlong
f793b36ff0
spawning async tasks now impl on all platforms
2019-09-15 19:09:08 -07:00
Wez Furlong
3d379791c8
refactor SpawnQueue on macos
2019-09-15 19:09:08 -07:00
Wez Furlong
6e8424a92d
refactor SpawnQueue on windows and x11
2019-09-15 19:09:08 -07:00
Wez Furlong
7128e3e7cc
compile on windows again
2019-09-15 19:09:08 -07:00
Wez Furlong
d4cafefb87
make the basic example build again on x11
2019-09-15 19:09:08 -07:00
Wez Furlong
cabb9d155c
see if we can DRY around some cross platform stuff, baby step
2019-09-15 19:09:08 -07:00
Wez Furlong
9a2037e846
fix some warnings
2019-09-15 19:09:08 -07:00
Wez Furlong
bdc634276d
plumbing for polling std::future::futures on macos
2019-09-15 19:09:08 -07:00
Wez Furlong
6d23be0164
use Image to generate underline glyphs
2019-09-15 19:09:08 -07:00
Wez Furlong
e98b29aec6
add apply function to safely access inner data
2019-09-15 19:09:08 -07:00
Wez Furlong
d69938701c
macos: cache the bitmap buffer across draw_rect calls
2019-09-15 19:09:08 -07:00
Wez Furlong
a4405ba60d
macos: plumb changing the cursor
2019-09-15 19:09:08 -07:00
Wez Furlong
5f547b6972
macos: allow changing window title
2019-09-15 19:09:08 -07:00
Wez Furlong
d8b143776d
plumb WindowOps for macos
2019-09-15 19:09:08 -07:00
Wez Furlong
0f25545014
decode key inputs
2019-09-15 19:09:08 -07:00
Wez Furlong
5f7d2f5ccc
basic plumbing for mouse input on macos
2019-09-15 19:09:08 -07:00
Wez Furlong
57992c0570
add resize handler for macos
2019-09-15 19:09:08 -07:00
Wez Furlong
8ae35f5b01
Arc -> Rc for macos
2019-09-15 19:09:08 -07:00
Wez Furlong
da90ad7ec6
fix byteorder for bitmaps on macos
2019-09-15 19:09:08 -07:00
Wez Furlong
0b7556893d
bunch of plumbing to allow using new window layer as software rendered frontend
2019-09-15 19:09:08 -07:00
Wez Furlong
9e63038391
propagate errors from set_cursor
2019-09-15 19:09:08 -07:00
Wez Furlong
c54d3b55be
prove that spawning additional windows works
2019-09-15 19:09:08 -07:00
Wez Furlong
dff8e1e652
introduce WindowContext for manipulating the window in a callback
2019-09-15 19:09:08 -07:00
Wez Furlong
e6265c93a4
add arbitrary line drawing with anti-aliasing
2019-09-15 19:09:08 -07:00
Wez Furlong
5d40733d8c
implement basic rendering for macos
2019-09-15 19:09:08 -07:00
Wez Furlong
e371e0385d
x11: mouse cursors
2019-09-15 19:09:08 -07:00
Wez Furlong
cc4a089c41
remove some debug prints
2019-09-15 19:09:08 -07:00
Wez Furlong
6902de9da4
mouse events for x11
2019-09-15 19:09:08 -07:00
Wez Furlong
f8f470ab1d
add mouse event processing for windows
2019-09-15 19:09:08 -07:00
Wez Furlong
05a60e6e8b
plumb keyboard events for x11
2019-09-15 19:09:08 -07:00
Wez Furlong
93f4008719
add keyboard support for windows
2019-09-15 19:09:08 -07:00
Wez Furlong
bed8664617
borrow input types from termwiz
2019-09-15 19:09:08 -07:00
Wez Furlong
7cd92a92c8
introduce Connection::executor() -> impl BasicExecutor
...
This can be called from any thread
2019-09-15 19:09:08 -07:00
Wez Furlong
cab062118b
promise: split execute out to BasicExecutor
...
This makes it easier to implement just the scheduling portion
without imposing other restrictions on the executor type.
2019-09-15 19:09:08 -07:00
Wez Furlong
7761b76d3c
almost impl Executor for x11 Connection
2019-09-15 19:09:08 -07:00
Wez Furlong
0ce4a0fb0d
impl Executor for win32 Connection
2019-09-15 19:09:08 -07:00
Wez Furlong
37541eef96
fixup probing for SHM support
2019-09-15 19:09:08 -07:00
Wez Furlong
95cc66e9c0
x11: maintain the image buffer across paint calls
2019-09-15 19:09:08 -07:00
Wez Furlong
ff0d079737
use shm when available
2019-09-15 19:09:08 -07:00
Wez Furlong
3a2493dc9e
fixup build on linux
2019-09-15 19:09:08 -07:00
Wez Furlong
b9b94aa516
add resize callback
2019-09-15 19:09:08 -07:00
Wez Furlong
56dc24a1ee
hook up paint method for x11
2019-09-15 19:09:08 -07:00
Wez Furlong
1de4165152
x11: plumb destroy notification more correctly
2019-09-15 19:09:08 -07:00
Wez Furlong
ee203b0b76
improve lifecycle management on macos
...
I'm not totally convinced that the refcounting is right
because I've not seen `dealloc` get triggered, but the
important thing is that closing the window does cause the
rust level objects to be dropped.
2019-09-15 19:09:08 -07:00
Wez Furlong
645f4f6315
really basic macos window
2019-09-15 19:09:08 -07:00
Wez Furlong
dc6ef6c55d
basic xcb windows too
2019-09-15 19:09:08 -07:00
Wez Furlong
ddd323464b
refactor traits to top level
2019-09-15 19:09:08 -07:00
Wez Furlong
29e3dce2c6
query the dpi for the context
2019-09-15 19:09:08 -07:00
Wez Furlong
cf586cd1d3
use BeginPaint
2019-09-15 19:09:08 -07:00
Wez Furlong
311760df90
introduce a paint context trait
2019-09-15 19:09:08 -07:00
Wez Furlong
a88f0f1beb
improve performance for clear operations
2019-09-15 19:09:08 -07:00
Wez Furlong
de7446b172
add beginnings of painting
2019-09-15 19:09:08 -07:00
Wez Furlong
f2928053aa
resurrect bitmap render code from 236960e1a8
...
Earlier in the life of wezterm we had software rendering in src/xgfx.rs.
This is the bitmap portion of that code from rev
236960e1a8
, tweaked slightly for more
recent changes to the palette crate.
2019-09-15 19:09:08 -07:00
Wez Furlong
f8e36b22eb
window: tidy up crate deps
2019-09-15 19:09:08 -07:00
Wez Furlong
723b76a5ea
DRY: use Option so we only call DefWindowProc once
2019-09-15 19:09:08 -07:00
Wez Furlong
f908d6aad3
add destroy callback
2019-09-15 19:09:08 -07:00
Wez Furlong
f678d02193
use dark mode
2019-09-15 19:09:08 -07:00
Wez Furlong
3b572cb35e
add window callback trait
2019-09-15 19:09:08 -07:00
Wez Furlong
276041a1db
add very basic win32 window creation
2019-09-15 19:09:08 -07:00