<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wayland/src/wayland-shm.c, branch 1.12</title>
<subtitle>[no description]</subtitle>
<id>http://git.sudomsg.com/mirror/wayland/atom/src/wayland-shm.c?h=1.12</id>
<link rel='self' href='http://git.sudomsg.com/mirror/wayland/atom/src/wayland-shm.c?h=1.12'/>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/'/>
<updated>2016-07-26T01:39:32Z</updated>
<entry>
<title>(multiple): Include stdint.h</title>
<updated>2016-07-26T01:39:32Z</updated>
<author>
<name>Yong Bakos</name>
<email>ybakos@humanoriented.com</email>
</author>
<published>2016-07-18T17:42:25Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=2b1c1b2d66945c5cb237a7264759b6dbdf42b02a'/>
<id>urn:sha1:2b1c1b2d66945c5cb237a7264759b6dbdf42b02a</id>
<content type='text'>
Some headers and source files have been using types such as uint32_t
without explicitly including stdint.h.

Explicitly include stdint.h where appropriate.

Signed-off-by: Yong Bakos &lt;ybakos@humanoriented.com&gt;
Reviewed-by: Eric Engestrom &lt;eric.engestrom@imgtec.com&gt;
</content>
</entry>
<entry>
<title>wayland-shm: Include wayland-util.h</title>
<updated>2016-06-07T13:07:01Z</updated>
<author>
<name>Yong Bakos</name>
<email>ybakos@humanoriented.com</email>
</author>
<published>2016-05-21T04:18:36Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=9000c0f20eb0e2b26b26cb85e27c9cd2ef0e312f'/>
<id>urn:sha1:9000c0f20eb0e2b26b26cb85e27c9cd2ef0e312f</id>
<content type='text'>
wayland-shm.c uses WL_EXPORT and wl_array, which are defined in
wayland-util.h.

Include wayland-util.h explicitly, rather than transitively through
wayland-server.h.

Signed-off-by: Yong Bakos &lt;ybakos@humanoriented.com&gt;
Reviewed-by: Sam Spilsbury &lt;smspillaz@gmail.com&gt;
</content>
</entry>
<entry>
<title>shm: Log a warning if a shm buffer address is requested when it may be invalid</title>
<updated>2016-03-09T00:55:02Z</updated>
<author>
<name>Derek Foreman</name>
<email>derekf@osg.samsung.com</email>
</author>
<published>2016-02-09T22:29:49Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=1d6e885b1dd7e481c7975f6641632ef107163482'/>
<id>urn:sha1:1d6e885b1dd7e481c7975f6641632ef107163482</id>
<content type='text'>
If wl_shm_buffer_get_data() is called on a shm pool that has an external
reference and a pending resize, then the buffer may be outside the pool's
current mapping.

Log a warning if this happens.

Signed-off-by: Derek Foreman &lt;derekf@osg.samsung.com&gt;
Reviewed-by: Bryce Harrington &lt;bryce@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>shm: Defer wl_shm_pool_resize if a pool has external references</title>
<updated>2016-03-09T00:54:38Z</updated>
<author>
<name>Derek Foreman</name>
<email>derekf@osg.samsung.com</email>
</author>
<published>2016-02-09T22:03:48Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=ed5f5030cae66576b081f261afb6233ec634f287'/>
<id>urn:sha1:ed5f5030cae66576b081f261afb6233ec634f287</id>
<content type='text'>
If a compositor is rendering in one thread while dispatching wayland
events in another, a wl_shm_pool_resize() could change the memory
mappings it's rendering from and cause a crash.

Now we defer wl_shm_pool_resize() if the compositor has references on a
pool, and perform the actual resize when it drops those references.

Signed-off-by: Derek Foreman &lt;derekf@osg.samsung.com&gt;
Reviewed-by: Bryce Harrington &lt;bryce@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>shm: Split pool reference counting into external and internal references</title>
<updated>2016-03-09T00:54:25Z</updated>
<author>
<name>Derek Foreman</name>
<email>derekf@osg.samsung.com</email>
</author>
<published>2016-02-09T22:03:47Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=442f4435868c1ea37e99d3f4fb316434e96faab1'/>
<id>urn:sha1:442f4435868c1ea37e99d3f4fb316434e96faab1</id>
<content type='text'>
This is a preliminary step towards deferring shm resize operations until
after the compositor has released all external references on a pool.

Signed-off-by: Derek Foreman &lt;derekf@osg.samsung.com&gt;
Reviewed-by: Bryce Harrington &lt;bryce@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>server: Fix shm_create_pool size fail path fd leak</title>
<updated>2016-03-09T00:37:20Z</updated>
<author>
<name>Sergi Granell</name>
<email>xerpi.g.12@gmail.com</email>
</author>
<published>2016-02-18T22:59:29Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=5fe7e7ca78eb8c5435f35ed47b54aabdbdcaadf7'/>
<id>urn:sha1:5fe7e7ca78eb8c5435f35ed47b54aabdbdcaadf7</id>
<content type='text'>
If the client passed a size &lt;= 0 to shm_create_pool, it would
go to err_free, which wouldn't close the fd, and thus leave it opened.

We can also move the size check before the struct wl_shm_pool
malloc, so in case the client passes a wrong size, it won't
do an unnecessary malloc and then free.
Reviewed-by: Bryce Harrington &lt;bryce@osg.samsung.com&gt;
Reviewed-by: Pekka Paalanen &lt;pekka.paalanen@collabora.co.uk&gt;
</content>
</entry>
<entry>
<title>cosmetic: add an space after if</title>
<updated>2016-02-05T00:37:40Z</updated>
<author>
<name>Sergi Granell</name>
<email>xerpi.g.12@gmail.com</email>
</author>
<published>2016-02-04T20:48:21Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=d33514379d311bd9ddd4a2e1e97c8205a8111d3c'/>
<id>urn:sha1:d33514379d311bd9ddd4a2e1e97c8205a8111d3c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>doc: Fix incorrect parameter name</title>
<updated>2016-01-12T04:13:12Z</updated>
<author>
<name>Jonas Ådahl</name>
<email>jadahl@gmail.com</email>
</author>
<published>2015-12-29T01:47:20Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=ee9b69cfe0c94a297e1dea7cc4ff147d740c4294'/>
<id>urn:sha1:ee9b69cfe0c94a297e1dea7cc4ff147d740c4294</id>
<content type='text'>
Signed-off-by: Jonas Ådahl &lt;jadahl@gmail.com&gt;
Reviewed-by: Daniel Stone &lt;daniels@collabora.com&gt;
Reviewed-by: Marek Chalupa &lt;mchqwerty@gmail.com&gt;
Reviewed-by: Derek Foreman &lt;derekf@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>Use zalloc instead of malloc + memset</title>
<updated>2016-01-12T04:13:12Z</updated>
<author>
<name>Jonas Ådahl</name>
<email>jadahl@gmail.com</email>
</author>
<published>2015-08-26T04:00:06Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=2e7fb786825472d2a4b717e0b82d216aa90fb3e0'/>
<id>urn:sha1:2e7fb786825472d2a4b717e0b82d216aa90fb3e0</id>
<content type='text'>
Signed-off-by: Jonas Ådahl &lt;jadahl@gmail.com&gt;
Reviewed-by: Daniel Stone &lt;daniels@collabora.com&gt;
Reviewed-by: Marek Chalupa &lt;mchqwerty@gmail.com&gt;
Reviewed-by: Derek Foreman &lt;derekf@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>shm: wl_shm_buffer_get_data() requires a valid pool.</title>
<updated>2015-11-06T11:42:52Z</updated>
<author>
<name>Derek Foreman</name>
<email>derekf@osg.samsung.com</email>
</author>
<published>2015-11-05T19:57:47Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=8bc42fbf7bb53f4942c50be10be572ee479bab0f'/>
<id>urn:sha1:8bc42fbf7bb53f4942c50be10be572ee479bab0f</id>
<content type='text'>
There's no situation where a shm buffer without a pool makes sense,
so we enforce the pool's existence a little more rigidly.

Acked-by: Pekka Paalanen &lt;pekka.paalanen@collabora.co.uk&gt;
Signed-off-by: Derek Foreman &lt;derekf@osg.samsung.com&gt;
Reviewed-by: Giulio Camuffo &lt;giuliocamuffo@gmail.com&gt;
</content>
</entry>
<entry>
<title>shm: Move deprecated function to the bottom of the file</title>
<updated>2015-11-06T11:42:46Z</updated>
<author>
<name>Derek Foreman</name>
<email>derekf@osg.samsung.com</email>
</author>
<published>2015-11-05T19:57:46Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=2aee2069a04afebf839d63c89411f639247e780b'/>
<id>urn:sha1:2aee2069a04afebf839d63c89411f639247e780b</id>
<content type='text'>
In wayland-server.c we group the deprecated functions and
disable doxygen for them.  Do that here too.

Acked-by: Pekka Paalanen &lt;pekka.paalanen@collabora.co.uk&gt;
Signed-off-by: Derek Foreman &lt;derekf@osg.samsung.com&gt;
Reviewed-by: Giulio Camuffo &lt;giuliocamuffo@gmail.com&gt;
</content>
</entry>
<entry>
<title>shm: Deprecate wl_shm_buffer_create()</title>
<updated>2015-11-06T11:42:33Z</updated>
<author>
<name>Derek Foreman</name>
<email>derekf@osg.samsung.com</email>
</author>
<published>2015-11-05T19:57:45Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=91881e8f89262f18f7543a6fd5f440ea5c13ce30'/>
<id>urn:sha1:91881e8f89262f18f7543a6fd5f440ea5c13ce30</id>
<content type='text'>
From irc:
&lt;pq&gt; it creates a wl_buffer object in a way that no client can ever
     access the storage.

So, let's replace it with return NULL; and mark it with attribute
deprecated in the header.

Reviewed-by: Pekka Paalanen &lt;pekka.paalanen@collabora.co.uk&gt;
Signed-off-by: Derek Foreman &lt;derekf@osg.samsung.com&gt;
Reviewed-by: Giulio Camuffo &lt;giuliocamuffo@gmail.com&gt;
</content>
</entry>
<entry>
<title>shm: Add shm_buffer ref and shm_pool unref functions</title>
<updated>2015-10-21T21:31:51Z</updated>
<author>
<name>Derek Foreman</name>
<email>derekf@osg.samsung.com</email>
</author>
<published>2015-10-20T01:54:49Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=eba83cd5e1645986768fcd918c2f5cd76ba54f01'/>
<id>urn:sha1:eba83cd5e1645986768fcd918c2f5cd76ba54f01</id>
<content type='text'>
Sometimes the compositor wants to make sure a shm pool doesn't disappear
out from under it.

For example, in Enlightenment, rendering happens in a separate thread
while the main thread can still dispatch events.  If a client is destroyed
during rendering, all its resources are cleaned up and its shm pools are
unmapped.  This causes the rendering thread to segfault.

This patch adds a way for the compositor to increment the refcount of the
shm pool so it can't disappear, and decrement it when it's finished.

The ref/unref are asymmetrical (ref returns the pool) because it's
possible the buffer itself will be gone when you need to unref the pool.

Reviewed-by: Pekka Paalanen &lt;pekka.paalanen@collabora.co.uk&gt;
Signed-off-by: Derek Foreman &lt;derekf@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>src: Update boilerplate from MIT X11 license to MIT Expat license</title>
<updated>2015-06-12T22:31:24Z</updated>
<author>
<name>Bryce Harrington</name>
<email>bryce@osg.samsung.com</email>
</author>
<published>2015-06-10T17:54:15Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=3c91b0878def1a42c6d0090fa0b5a47df6092d7c'/>
<id>urn:sha1:3c91b0878def1a42c6d0090fa0b5a47df6092d7c</id>
<content type='text'>
Signed-off-by: Bryce Harrington &lt;bryce@osg.samsung.com&gt;
Reviewed-by: Pekka Paalanen &lt;pekka.paalanen@collabora.co.uk&gt;
</content>
</entry>
<entry>
<title>cosmetic: convert some function returns from int to bool</title>
<updated>2014-11-04T11:01:58Z</updated>
<author>
<name>Derek Foreman</name>
<email>derekf@osg.samsung.com</email>
</author>
<published>2014-10-03T19:39:59Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=322cd6dded6db0f82e04c2b7ac9d5eb073e41ebc'/>
<id>urn:sha1:322cd6dded6db0f82e04c2b7ac9d5eb073e41ebc</id>
<content type='text'>
[Pekka Paalanen: change is_nullable_type() return value to bool.]

Reviewed-by: Pekka Paalanen &lt;pekka.paalanen@collabora.co.uk&gt;
</content>
</entry>
<entry>
<title>shm: fix error in comment</title>
<updated>2014-09-11T08:46:45Z</updated>
<author>
<name>Derek Foreman</name>
<email>derekf@osg.samsung.com</email>
</author>
<published>2014-09-10T18:46:09Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=4d7dfa0867d7661c86b717998ea96a0f2987cee2'/>
<id>urn:sha1:4d7dfa0867d7661c86b717998ea96a0f2987cee2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>shm: Disallow shrinking shm pools</title>
<updated>2014-04-07T23:01:25Z</updated>
<author>
<name>Kristian Høgsberg</name>
<email>krh@bitplanet.net</email>
</author>
<published>2014-04-07T21:42:20Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=24cdbe3d69763708dcd156edfbe7aa8d00bab860'/>
<id>urn:sha1:24cdbe3d69763708dcd156edfbe7aa8d00bab860</id>
<content type='text'>
Unused shm space will be automatically reclaimed if unused or can be
explicitly returned by using fallocate FALLOC_FL_PUNCH_HOLE.

https://bugs.freedesktop.org/show_bug.cgi?id=74632
</content>
</entry>
<entry>
<title>shm: assert sigbus_data is not NULL before member access</title>
<updated>2014-01-15T18:46:08Z</updated>
<author>
<name>U. Artie Eoff</name>
<email>ullysses.a.eoff@intel.com</email>
</author>
<published>2014-01-10T19:26:27Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=f97df69ee2b8981533358b6f62fadb8c0e18a278'/>
<id>urn:sha1:f97df69ee2b8981533358b6f62fadb8c0e18a278</id>
<content type='text'>
Signed-off-by: U. Artie Eoff &lt;ullysses.a.eoff@intel.com&gt;
</content>
</entry>
<entry>
<title>shm: Avoid file descriptor leak upon unsuccessful mmap</title>
<updated>2013-11-16T00:21:45Z</updated>
<author>
<name>Lubomir Rintel</name>
<email>lkundrak@v3.sk</email>
</author>
<published>2013-11-15T13:17:56Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=4a196570a3f528e9092014f8320f4a2bb4aba680'/>
<id>urn:sha1:4a196570a3f528e9092014f8320f4a2bb4aba680</id>
<content type='text'>
It would be possible to make the compositor leak file descriptors by
passing descriptors of open unmmapable files to it, such as /dev/null.

Signed-off-by: Lubomir Rintel &lt;lkundrak@v3.sk&gt;
</content>
</entry>
<entry>
<title>Add documentation for wl_shm_buffer_begin/end_access</title>
<updated>2013-11-15T22:46:48Z</updated>
<author>
<name>Neil Roberts</name>
<email>neil@linux.intel.com</email>
</author>
<published>2013-11-14T12:28:51Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=c2bba88ccd68c5ea6792a875499cec276db594f8'/>
<id>urn:sha1:c2bba88ccd68c5ea6792a875499cec276db594f8</id>
<content type='text'>
It's not obvious that these functions are needed so it would be good
to have some documentation for them.
</content>
</entry>
<entry>
<title>server: Add API to protect access to an SHM buffer</title>
<updated>2013-11-14T00:31:28Z</updated>
<author>
<name>Neil Roberts</name>
<email>neil@linux.intel.com</email>
</author>
<published>2013-11-13T15:32:05Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=cf4f5995dce400b2feaf9875d5bbc7c42a99f905'/>
<id>urn:sha1:cf4f5995dce400b2feaf9875d5bbc7c42a99f905</id>
<content type='text'>
Linux will let you mmap a region of a file that is larger than the
size of the file. If you then try to read from that region the process
will get a SIGBUS signal. Currently the clients can use this to crash
a compositor because it can create a pool and lie about the size of
the file which will cause the compositor to try and read past the end
of it. The compositor can't simply check the size of the file to
verify that it is big enough because then there is a race condition
where the client may truncate the file after the check is performed.

This patch adds the following two public functions in the server API
which can be used wrap access to an SHM buffer:

void wl_shm_buffer_begin_access(struct wl_shm_buffer *buffer);
void wl_shm_buffer_end_access(struct wl_shm_buffer *buffer);

The first time wl_shm_buffer_begin_access is called a signal handler
for SIGBUS will be installed. If the signal is caught then the buffer
for the current pool is remapped to an anonymous private buffer at the
same address which allows the compositor to continue without crashing.
The end_access function will then post an error to the buffer
resource.

The current pool is stored as part of some thread-local storage so
that multiple threads can safely independently access separate
buffers.

Eventually we may want to add some more API so that compositors can
hook into the signal handler or replace it entirely if they also want
to do some SIGBUS handling.
</content>
</entry>
<entry>
<title>shm: Add API for renderers to register additional pixel formats</title>
<updated>2013-08-06T23:48:02Z</updated>
<author>
<name>Tomeu Vizoso</name>
<email>tomeu@tomeuvizoso.net</email>
</author>
<published>2013-08-06T18:05:53Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=d9883a6be1688a716a235466a59f5c5432e87e65'/>
<id>urn:sha1:d9883a6be1688a716a235466a59f5c5432e87e65</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Replace two remaining wl_display_add_gloavl() occurences</title>
<updated>2013-07-09T23:18:10Z</updated>
<author>
<name>Kristian Høgsberg</name>
<email>krh@bitplanet.net</email>
</author>
<published>2013-07-09T23:18:10Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=7100a5e0bb07d77f1700abe53968ffc5ba3749ce'/>
<id>urn:sha1:7100a5e0bb07d77f1700abe53968ffc5ba3749ce</id>
<content type='text'>
</content>
</entry>
<entry>
<title>wayland-server: Remove error event posting from wl_resource_create</title>
<updated>2013-07-02T21:01:46Z</updated>
<author>
<name>Kristian Høgsberg</name>
<email>krh@bitplanet.net</email>
</author>
<published>2013-07-02T19:39:03Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=c82a52a47e5e01246680b5d257fff7bc42cb48bf'/>
<id>urn:sha1:c82a52a47e5e01246680b5d257fff7bc42cb48bf</id>
<content type='text'>
The wl_client_add/new_object() functions sends out an NO_MEMORY error if
the allocation fails.  This was convenient in a couple of places where
that was all the error handling that was needed.  Unfortunately that
looks like out-of-memory isn't handled at the call site and set a bad
precedent for not cleaning up properly or not handling at all.

As we're introducing wl_resource_create() as a replacement for those two
functions, let's remove the automatic error event posting and require
the caller to do that if necessary.

This commit also introduces a new helper, wl_client_post_no_memory() to
make it possible to send NO_MEMORY events from bind where we don't have
a wl_resource.
</content>
</entry>
<entry>
<title>Add wl_resource_create() and a version field to wl_resource</title>
<updated>2013-07-02T21:01:23Z</updated>
<author>
<name>Jason Ekstrand</name>
<email>jason@jlekstrand.net</email>
</author>
<published>2013-06-28T01:09:20Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=4917a967bdcd33b7ad264af9c984c3957d87f569'/>
<id>urn:sha1:4917a967bdcd33b7ad264af9c984c3957d87f569</id>
<content type='text'>
A new function, wl_resource_create(), lets the compositor create a
wl_resource for a given version of the interface.  Passing 0 for the
object ID will allocate a new ID. The implementation, user data and
destructor can be set with wl_resource_set_implementation().

These two functions deprecates wl_client_add/new_object and the
main difference and motivation is the ability to provide a version number
for the resource.  This lets the compositor track which version of the
interface a client has created and we'll use that to verify incoming requests.

Signed-off-by: Jason Ekstrand &lt;jason@jlekstrand.net&gt;
</content>
</entry>
<entry>
<title>server: Make wl_object and wl_resource opaque structs</title>
<updated>2013-07-02T19:52:47Z</updated>
<author>
<name>Kristian Høgsberg</name>
<email>krh@bitplanet.net</email>
</author>
<published>2013-06-28T01:09:18Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=d94a8722cb29d8b897672be66ff3c9ff79eab6fe'/>
<id>urn:sha1:d94a8722cb29d8b897672be66ff3c9ff79eab6fe</id>
<content type='text'>
With the work to add wl_resource accessors and port weston to use them,
we're ready to make wl_resource and wl_object opaque structs.  We keep
wl_buffer in the header for EGL stacks to use, but don't expose it by
default.  In time we'll remove it completely, but for now it provides a
transition paths for code that still uses wl_buffer.

Reviewed-by: Jason Ekstrand&lt;jason@jlekstrand.net&gt;
</content>
</entry>
<entry>
<title>Change wl_shm_buffer to use a resource pointer</title>
<updated>2013-06-21T23:18:08Z</updated>
<author>
<name>Jason Ekstrand</name>
<email>jason@jlekstrand.net</email>
</author>
<published>2013-06-21T01:36:49Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=3af748b872f8f1ac4ce536b9826cc7ecbe74df6a'/>
<id>urn:sha1:3af748b872f8f1ac4ce536b9826cc7ecbe74df6a</id>
<content type='text'>
This commit also has the effect of making wl_shm_buffer no longer a
wl_buffer derivative.

Signed-off-by: Jason Ekstrand &lt;jason@jlekstrand.net&gt;
</content>
</entry>
<entry>
<title>Change SHM wl_buffer functions to use the wl_shm_buffer structure</title>
<updated>2013-06-21T23:18:06Z</updated>
<author>
<name>Jason Ekstrand</name>
<email>jason@jlekstrand.net</email>
</author>
<published>2013-06-21T01:36:48Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=ee0d986a50aed60a4373dc1f4ca36f4180def1a9'/>
<id>urn:sha1:ee0d986a50aed60a4373dc1f4ca36f4180def1a9</id>
<content type='text'>
This commit does not break ABI.  It merely changes the types of some things
and adds a wl_shm_buffer_get function.

Signed-off-by: Jason Ekstrand &lt;jason@jlekstrand.net&gt;
</content>
</entry>
<entry>
<title>Add accessor functions for wl_resource and deprecate wl_client_add_resource</title>
<updated>2013-06-05T04:59:08Z</updated>
<author>
<name>Jason Ekstrand</name>
<email>jason@jlekstrand.net</email>
</author>
<published>2013-06-01T22:40:54Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=1488c96a5db72bcd3b73fabd1f26e8031f773f64'/>
<id>urn:sha1:1488c96a5db72bcd3b73fabd1f26e8031f773f64</id>
<content type='text'>
This is the first step towards making wl_resource an opaque pointer type.

Signed-off-by: Jason Ekstrand &lt;jason@jlekstrand.net&gt;
</content>
</entry>
<entry>
<title>Add wl_resource_init and use it in libwayland implementations of data sharing and SHM</title>
<updated>2013-03-19T03:04:32Z</updated>
<author>
<name>Jason Ekstrand</name>
<email>jason@jlekstrand.net</email>
</author>
<published>2013-03-09T04:26:13Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=bedc3432ff731b0ad680831ecc66a7a5829621a6'/>
<id>urn:sha1:bedc3432ff731b0ad680831ecc66a7a5829621a6</id>
<content type='text'>
This commit adds a wl_resource_init function for initializing wl_resource
structures similar to wl_client_add_object.

From this commit forward, wl_resource structures should not be initialized
manually, but should use wl_resource_init.  In the event of a change to the
wl_resource structure, this allows us to protect against regressions by filling
in added fields with reasonable defaults.  In this way, while changing
wl_object or wl_resource still constitutes an ABI break, compositors following
this rule will only need to be recompiled in order to properly link against the
new version.

Signed-off-by: Jason Ekstrand &lt;jason@jlekstrand.net&gt;
</content>
</entry>
<entry>
<title>Move un-namespaced container_of into private header</title>
<updated>2012-10-20T03:06:53Z</updated>
<author>
<name>Kristian Høgsberg</name>
<email>krh@bitplanet.net</email>
</author>
<published>2012-10-20T03:06:53Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=7ec35d8e13c28b39d412127ac2459854c66cdfd5'/>
<id>urn:sha1:7ec35d8e13c28b39d412127ac2459854c66cdfd5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add wl_shm_buffer_create()</title>
<updated>2012-08-16T14:49:48Z</updated>
<author>
<name>Kristian Høgsberg</name>
<email>krh@bitplanet.net</email>
</author>
<published>2012-08-16T03:03:21Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=7d3ccec18eda14a30c3edae608195898262f0d27'/>
<id>urn:sha1:7d3ccec18eda14a30c3edae608195898262f0d27</id>
<content type='text'>
</content>
</entry>
<entry>
<title>wayland-shm: Commit the width/height getters that actually compile</title>
<updated>2012-07-20T16:30:07Z</updated>
<author>
<name>Kristian Høgsberg</name>
<email>krh@bitplanet.net</email>
</author>
<published>2012-07-20T16:30:07Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=76bfd68f47c6cd8552151aa90efc4e5d074d14f9'/>
<id>urn:sha1:76bfd68f47c6cd8552151aa90efc4e5d074d14f9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>shm: Add shm_buffer getters for width and height</title>
<updated>2012-07-20T16:04:42Z</updated>
<author>
<name>Kristian Høgsberg</name>
<email>krh@bitplanet.net</email>
</author>
<published>2012-07-20T16:04:42Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=7ba218c9f80c9ce6f1a54e4e1b2f8aa66c590ade'/>
<id>urn:sha1:7ba218c9f80c9ce6f1a54e4e1b2f8aa66c590ade</id>
<content type='text'>
</content>
</entry>
<entry>
<title>wayland-shm: Add return before we hit the error clean-up path</title>
<updated>2012-07-10T01:50:39Z</updated>
<author>
<name>Kristian Høgsberg</name>
<email>krh@bitplanet.net</email>
</author>
<published>2012-07-10T01:50:39Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=b4aff6b79f80cf8110de346e527b2288903a839f'/>
<id>urn:sha1:b4aff6b79f80cf8110de346e527b2288903a839f</id>
<content type='text'>
Regression in c94c0946db694ec29b5aebb94a8be0501bacfbc7
</content>
</entry>
<entry>
<title>shm: Plug leak in shm_create_pool()</title>
<updated>2012-07-09T21:59:45Z</updated>
<author>
<name>Martin Olsson</name>
<email>martin@minimum.se</email>
</author>
<published>2012-07-09T09:35:57Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=c94c0946db694ec29b5aebb94a8be0501bacfbc7'/>
<id>urn:sha1:c94c0946db694ec29b5aebb94a8be0501bacfbc7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>shm: use mremap on pool resize</title>
<updated>2012-05-23T14:03:53Z</updated>
<author>
<name>Ander Conselvan de Oliveira</name>
<email>ander.conselvan.de.oliveira@intel.com</email>
</author>
<published>2012-05-23T13:09:55Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=086b4e2c1a129b55986a67ec0d8be35b29707a95'/>
<id>urn:sha1:086b4e2c1a129b55986a67ec0d8be35b29707a95</id>
<content type='text'>
</content>
</entry>
<entry>
<title>shm: Zero busy count for allocated buffers</title>
<updated>2012-05-22T19:50:26Z</updated>
<author>
<name>Rob Bradford</name>
<email>rob@linux.intel.com</email>
</author>
<published>2012-05-22T17:48:14Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=3cc187c73ef73cd345138fd746344299f94933e8'/>
<id>urn:sha1:3cc187c73ef73cd345138fd746344299f94933e8</id>
<content type='text'>
This avoids a valgrind error like:

==31496== Conditional jump or move depends on uninitialised value(s)
==31496==    at 0x407620: weston_buffer_post_release (compositor.c:928)
==31496==    by 0x406AEB: weston_surface_attach (compositor.c:725)
==31496==    by 0x409EB8: pointer_attach (compositor.c:2009)
==31496==    by 0x34ECE05D63: ffi_call_unix64 (unix64.S:75)
==31496==    by 0x34ECE05784: ffi_call (ffi64.c:486)
==31496==    by 0x5674C4D: wl_closure_invoke (connection.c:770)
==31496==    by 0x566ECCB: wl_client_connection_data (wayland-server.c:255)
==31496==    by 0x56722F9: wl_event_source_fd_dispatch (event-loop.c:79)
==31496==    by 0x5672C99: wl_event_loop_dispatch (event-loop.c:410)
==31496==    by 0x56705FF: wl_display_run (wayland-server.c:1004)
==31496==    by 0x40C775: main (compositor.c:2937)
==31496==  Uninitialised value was created by a heap allocation
==31496==    at 0x4A074CD: malloc (vg_replace_malloc.c:236)
==31496==    by 0x5670EA7: shm_pool_create_buffer (wayland-shm.c:113)
==31496==    by 0x34ECE05D63: ffi_call_unix64 (unix64.S:75)
==31496==    by 0x34ECE05784: ffi_call (ffi64.c:486)
==31496==    by 0x5674C4D: wl_closure_invoke (connection.c:770)
==31496==    by 0x566ECCB: wl_client_connection_data (wayland-server.c:255)
==31496==    by 0x56722F9: wl_event_source_fd_dispatch (event-loop.c:79)
==31496==    by 0x5672C99: wl_event_loop_dispatch (event-loop.c:410)
==31496==    by 0x56705FF: wl_display_run (wayland-server.c:1004)
==31496==    by 0x40C775: main (compositor.c:2937)
</content>
</entry>
<entry>
<title>shm: Add request for resizing pools</title>
<updated>2012-05-22T19:20:12Z</updated>
<author>
<name>Ander Conselvan de Oliveira</name>
<email>ander.conselvan.de.oliveira@intel.com</email>
</author>
<published>2012-05-22T12:39:40Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=ff0d7456742343400b00fa58c77efa51d5ab5d6d'/>
<id>urn:sha1:ff0d7456742343400b00fa58c77efa51d5ab5d6d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Switch protocol to using serial numbers for ordering events and requests</title>
<updated>2012-04-12T02:27:26Z</updated>
<author>
<name>Kristian Høgsberg</name>
<email>krh@bitplanet.net</email>
</author>
<published>2012-04-12T02:25:51Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=5535f155d8567a07596660a18b6d38a46acfe987'/>
<id>urn:sha1:5535f155d8567a07596660a18b6d38a46acfe987</id>
<content type='text'>
The wayland protocol, as X, uses timestamps to match up certain
requests with input events.  The problem is that sometimes we need to
send out an event that doesn't have a corresponding timestamped input
event.  For example, the pointer focus surface goes away and new
surface needs to receive a pointer enter event.  These events are
normally timestamped with the evdev event timestamp, but in this case,
we don't have a evdev timestamp.  So we have to go to gettimeofday (or
clock_gettime()) and then we don't know if it's coming from the same
time source etc.

However for all these cases we don't need a real time timestamp, we
just need a serial number that encodes the order of events inside the
server.  So we introduce a serial number mechanism that we can use to
order events.  We still need real-time timestamps for actual input
device events (motion, buttons, keys, touch), to be able to reason
about double-click speed and movement speed so events that correspond to user input carry both a serial number and a timestamp.

The serial number also give us a mechanism to key together events that
are "logically the same" such as a unicode event and a keycode event,
or a motion event and a relative event from a raw device.
</content>
</entry>
<entry>
<title>shm: Allocate shm buffers through new wl_shm_pool interface</title>
<updated>2012-04-03T16:34:22Z</updated>
<author>
<name>Kristian Høgsberg</name>
<email>krh@bitplanet.net</email>
</author>
<published>2012-04-03T16:08:50Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=aa777e5b10e17d12c4bb6440f7c659d2a12191f5'/>
<id>urn:sha1:aa777e5b10e17d12c4bb6440f7c659d2a12191f5</id>
<content type='text'>
There's a big cost to setting up and tearing down a mmap and faulting in
the pages to back it.  For cases where we're continuously reallocating
shm wl_buffers (resizing a surface, typically) it is a big performance
improvement to be able to reuse a mmap area.  This change makes the shm
buffer allocation a two step process: first allocate a wl_shm_pool, then
allocate a buffer from the pool.  The wl_shm_pool encapsulate the shared
memory pool, and lets clients allocate wl_buffers backed by chunks of that
memory.  Buffers are allocated at an offset into the pool, so it's possible
to create multiple buffers from one pool, for example for icons or cursor
images.
</content>
</entry>
<entry>
<title>shm: Fix stride signedness in protocol</title>
<updated>2012-03-30T14:24:29Z</updated>
<author>
<name>Kristian Høgsberg</name>
<email>krh@bitplanet.net</email>
</author>
<published>2012-03-30T14:24:29Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=485dd7b6e2691e7bd0016c5363c4444adc429e30'/>
<id>urn:sha1:485dd7b6e2691e7bd0016c5363c4444adc429e30</id>
<content type='text'>
Make stride argument of wl_shm.create_buffer a signed integer.
</content>
</entry>
<entry>
<title>shm: fix cosmetic gcc warnings</title>
<updated>2012-03-30T14:09:38Z</updated>
<author>
<name>Pekka Paalanen</name>
<email>ppaalanen@gmail.com</email>
</author>
<published>2012-03-22T09:33:35Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=c2a405be5aeb3b1a320aa50e7049943d7cc09e90'/>
<id>urn:sha1:c2a405be5aeb3b1a320aa50e7049943d7cc09e90</id>
<content type='text'>
Fix warning: 'static' is not at beginning of declaration

Signed-off-by: Pekka Paalanen &lt;ppaalanen@gmail.com&gt;
</content>
</entry>
<entry>
<title>Remove wl_buffer.damage and simplify shm implementation</title>
<updated>2012-03-26T20:33:24Z</updated>
<author>
<name>Kristian Høgsberg</name>
<email>krh@bitplanet.net</email>
</author>
<published>2012-03-26T20:33:24Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=83685c506e76212ae4e5cb722205d98d3b0603b9'/>
<id>urn:sha1:83685c506e76212ae4e5cb722205d98d3b0603b9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>server: use the event sending wrappers</title>
<updated>2012-03-02T16:06:19Z</updated>
<author>
<name>Pekka Paalanen</name>
<email>ppaalanen@gmail.com</email>
</author>
<published>2012-03-02T15:08:59Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=5ee70146c60b80fec446d698d0a55dd9211b36b2'/>
<id>urn:sha1:5ee70146c60b80fec446d698d0a55dd9211b36b2</id>
<content type='text'>
This exposes some type mismatches that are fixed in the next commit.

Signed-off-by: Pekka Paalanen &lt;ppaalanen@gmail.com&gt;
</content>
</entry>
<entry>
<title>shm: Drop non-premul format, use less ambiguous ARGB8888 naming convention</title>
<updated>2012-01-11T19:19:54Z</updated>
<author>
<name>Kristian Høgsberg</name>
<email>krh@bitplanet.net</email>
</author>
<published>2012-01-11T19:19:50Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=151ca457b4384c385c0062716b55595e22fef7ea'/>
<id>urn:sha1:151ca457b4384c385c0062716b55595e22fef7ea</id>
<content type='text'>
This also matches the new wl_drm format names.
</content>
</entry>
<entry>
<title>server: Make error posting functions take a resource instead of a client</title>
<updated>2011-09-01T13:53:33Z</updated>
<author>
<name>Kristian Høgsberg</name>
<email>krh@bitplanet.net</email>
</author>
<published>2011-09-01T13:53:33Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=25fddf65a8df409195616b308051d7e426cfa97a'/>
<id>urn:sha1:25fddf65a8df409195616b308051d7e426cfa97a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove the wl_visual interface</title>
<updated>2011-08-31T22:34:21Z</updated>
<author>
<name>Kristian Høgsberg</name>
<email>krh@bitplanet.net</email>
</author>
<published>2011-08-31T01:26:19Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=c640571c00b0c1ffafb05b1ad5cd02cd511cb06a'/>
<id>urn:sha1:c640571c00b0c1ffafb05b1ad5cd02cd511cb06a</id>
<content type='text'>
The visual interface was meant to be a generic mechanism for
specifying the content of a buffer.  It goes back to before we had the
buffer factory interfaces (like wl_drm and wl_shm) and we wanted to
keep it open-ended enough that yuv, png or even svg buffer or so would
be possible.

Now that we have the buffer abstraction, we can add different buffer
types by introducing new interfaces that create buffers.  It only
makes sense to leave it to those interfaces to specify the contents of
the buffers.

For wl_shm, this means that we now just specify the pixel format using
an enum.  For EGL buffers, the exact pixel formats are controlled by
the implementation (part of wl_drm and similar), and from the client
point of view, everything is controlled using EGLConfigs.
</content>
</entry>
<entry>
<title>shm: Compare resource interface when validating visual</title>
<updated>2011-08-29T19:01:26Z</updated>
<author>
<name>Kristian Høgsberg</name>
<email>krh@bitplanet.net</email>
</author>
<published>2011-08-29T19:01:26Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=47b446987d79fa77e6899ab1dc290a992ac5c241'/>
<id>urn:sha1:47b446987d79fa77e6899ab1dc290a992ac5c241</id>
<content type='text'>
</content>
</entry>
<entry>
<title>server: Pass struct wl_resource for object references</title>
<updated>2011-08-27T16:06:11Z</updated>
<author>
<name>Kristian Høgsberg</name>
<email>krh@bitplanet.net</email>
</author>
<published>2011-08-27T16:05:09Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=b15259bff48aa5a1f4f4c2a0675ce06e50a8c82f'/>
<id>urn:sha1:b15259bff48aa5a1f4f4c2a0675ce06e50a8c82f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Always allocate a new wl_resource when binding an object</title>
<updated>2011-08-27T16:06:11Z</updated>
<author>
<name>Kristian Høgsberg</name>
<email>krh@bitplanet.net</email>
</author>
<published>2011-08-19T20:57:48Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=cc6fd94d6a5743eb94b52f1887557305784525c9'/>
<id>urn:sha1:cc6fd94d6a5743eb94b52f1887557305784525c9</id>
<content type='text'>
Previously we would bind some resources into multiple client hash tables.
</content>
</entry>
<entry>
<title>server: Assign global id as part of wl_display_add_global()</title>
<updated>2011-08-27T16:06:11Z</updated>
<author>
<name>Kristian Høgsberg</name>
<email>krh@bitplanet.net</email>
</author>
<published>2011-08-19T15:08:09Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=3ac8757ec3f2166401afa9e059e934713382d211'/>
<id>urn:sha1:3ac8757ec3f2166401afa9e059e934713382d211</id>
<content type='text'>
</content>
</entry>
<entry>
<title>server: Make everything in the object hash a wl_resource</title>
<updated>2011-08-27T16:06:10Z</updated>
<author>
<name>Kristian Høgsberg</name>
<email>krh@bitplanet.net</email>
</author>
<published>2011-08-18T21:53:50Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=e8a192ca616107dcb672b34d0c80f2de679bcd0a'/>
<id>urn:sha1:e8a192ca616107dcb672b34d0c80f2de679bcd0a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rename source subdir from wayland to src</title>
<updated>2011-08-12T20:25:14Z</updated>
<author>
<name>Kristian Høgsberg</name>
<email>krh@bitplanet.net</email>
</author>
<published>2011-08-12T19:09:00Z</published>
<link rel='alternate' type='text/html' href='http://git.sudomsg.com/mirror/wayland/commit/?id=4c260db68c028f05401727d1911582ae8b87cd70'/>
<id>urn:sha1:4c260db68c028f05401727d1911582ae8b87cd70</id>
<content type='text'>
</content>
</entry>
</feed>
