Comments (7)
I don't think lines 1465 to 1469 are in fact unnecessary, even though it might appear so. While the call to xcb_shm_get_image for example looks out of place, internally it (I presume) updates or syncs the buffers for external access. Earlier, I did try would it work without it, or if I moved it to somewhere else and called it maybe once, but the testing showed that it would only result in black buffers. I'm not aware of better usage when dealing with SHM though. What are the other occurrences where it would seem (or is definitely the case) some portion of code is not needed?
from chamferwm.
What are the other occurrences where it would seem (or is definitely the case) some portion of code is not needed?
in that file the lines 1485-1489.
from chamferwm.
I don't think lines 1465 to 1469 are in fact unnecessary, even though it might appear so. While the call to xcb_shm_get_image for example looks out of place, internally it (I presume) updates or syncs the buffers for external access. Earlier, I did try would it work without it, or if I moved it to somewhere else and called it maybe once, but the testing showed that it would only result in black buffers. I'm not aware of better usage when dealing with SHM though.
ok, but why creating pointer xcb_shm_get_image_reply_t *pimageReply
?
from chamferwm.
In some cases the image depth is given by pimageReply
, although not needed everywhere. However, elsewhere we're just getting the reply and then discarding it immediately after by freeing the memory. This just gave me an idea that I could try xcb_discard_reply
instead of calling xcb_shm_get_image_reply
. The problem might be that xcb_discard_reply
is non-blocking, and the buffers may not yet be available for copying by the time it returns, so it might fail. But I will test it for sure, and if everything looks normal, I can make the changes.
from chamferwm.
Nope, it didn't work. While the window contents are visible, the frames are no longer synchronized. In the current design, xcb_shm_get_image_reply
is needed to wait for the internal update to finish, and the returned pointer is needed to free the memory. I'll leave this open again for some time if there will be better ideas how to handle it.
from chamferwm.
I just think that *_reply is for data access only -- it does nothing about the internal Xorg structure.
from chamferwm.
It doesn't, but it allows one to wait for the internals to be ready for copying. If the next step i.e. access to the shared memory buffers is done without it, it seems to result in glitching and dropped frames.
from chamferwm.
Related Issues (20)
- Error: SHM extension unavailable. HOT 5
- White screen HOT 5
- why? HOT 1
- Crash on launch HOT 4
- Possible to Launch with Light DM? HOT 1
- Multi-monitor Set-up? HOT 2
- Crash on startup with default config HOT 1
- Installation steps with AUR HOT 11
- How is the ICCCM and EWMH support? HOT 3
- Steam input doesn't work HOT 2
- Compilation on debian 10 HOT 1
- VK_EXT_image_drm_format_modifier HOT 2
- Noob problem
- Can't focus java swing window
- VK_KHR_incremental_present (VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME) does not seem to be available with NVIDIA HOT 1
- Keystroke to start browser does not work HOT 2
- Immediate crash with xf86-intel-video and xorg-server-git HOT 5
- Switching ttys crashes chamfer HOT 1
- Create a more basic shader/aestethic settings in config file HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chamferwm.