<feed xmlns='http://www.w3.org/2005/Atom'>
<title>swaylock/.git/render.c, branch v1.7.1</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/'/>
<entry>
<title>Estimate buffer size in advance for render_frame</title>
<updated>2023-01-27T11:19:32+00:00</updated>
<author>
<name>Manuel Stoeckl</name>
<email>code@mstoeckl.com</email>
</author>
<published>2023-01-14T19:51:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=10ab8b274020a9323413d093c45f13490929fb81'/>
<id>10ab8b274020a9323413d093c45f13490929fb81</id>
<content type='text'>
The size of the surface used to draw the indicator depends on
the extents of the text being drawn on and under the indicator.

This commit refactors the `render_frame` function so that the surface
size is computed before drawing; before, `render_frame` drew onto a
buffer, estimated the size the buffer should have had, and recursively
called itself to try again with the estimated size, if necessary. This
was done because Cairo's methods to estimate font and text size
require that a cairo_t context object and an associated cairo_surface
already have been set up. Since the surface size depends on the text
size, the natural way to use Cairo would have a circular dependency.

In order to compute sizes _before_ the buffer is created, this commit
adds a 1x1 surface and a matching `test_cairo` context which is set to
the same font and drawing parameters as the buffer that will be
created. Font/text extent measurements should give the same results as
for the final buffer.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The size of the surface used to draw the indicator depends on
the extents of the text being drawn on and under the indicator.

This commit refactors the `render_frame` function so that the surface
size is computed before drawing; before, `render_frame` drew onto a
buffer, estimated the size the buffer should have had, and recursively
called itself to try again with the estimated size, if necessary. This
was done because Cairo's methods to estimate font and text size
require that a cairo_t context object and an associated cairo_surface
already have been set up. Since the surface size depends on the text
size, the natural way to use Cairo would have a circular dependency.

In order to compute sizes _before_ the buffer is created, this commit
adds a 1x1 surface and a matching `test_cairo` context which is set to
the same font and drawing parameters as the buffer that will be
created. Font/text extent measurements should give the same results as
for the final buffer.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove overridden surface attachment</title>
<updated>2023-01-27T11:19:32+00:00</updated>
<author>
<name>Manuel Stoeckl</name>
<email>code@mstoeckl.com</email>
</author>
<published>2023-01-14T19:49:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=b4e3a2b0fdda3fcbc40e19c94bb7a7961aa7653c'/>
<id>b4e3a2b0fdda3fcbc40e19c94bb7a7961aa7653c</id>
<content type='text'>
The removed lines had no effect, since later in `render_frame`
buffer-&gt;buffer is attached to surface-&gt;child.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The removed lines had no effect, since later in `render_frame`
buffer-&gt;buffer is attached to surface-&gt;child.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix capitalization.</title>
<updated>2022-11-21T15:31:11+00:00</updated>
<author>
<name>sonny</name>
<email>106631960+digitalwtf@users.noreply.github.com</email>
</author>
<published>2022-11-06T01:31:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=226244e93ce513de07064b88ff746b8424571672'/>
<id>226244e93ce513de07064b88ff746b8424571672</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>renderer: work with current buffer locally</title>
<updated>2022-11-14T20:06:41+00:00</updated>
<author>
<name>Alexander Orzechowski</name>
<email>orzechowski.alexander@gmail.com</email>
</author>
<published>2022-09-24T08:18:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=5c1b16b957bfc45010dd22a03aa8f5135d3bac0c'/>
<id>5c1b16b957bfc45010dd22a03aa8f5135d3bac0c</id>
<content type='text'>
No need to store this globally accessible struct member.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No need to store this globally accessible struct member.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove redundant function render_frames()</title>
<updated>2022-03-20T21:54:39+00:00</updated>
<author>
<name>Johan Malm</name>
<email>jgm323@gmail.com</email>
</author>
<published>2022-03-20T21:08:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=06d22a8deac2acc465b9eb7264db3729d49f6edd'/>
<id>06d22a8deac2acc465b9eb7264db3729d49f6edd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Prevent attaching and committing the surface twice</title>
<updated>2021-07-05T20:56:20+00:00</updated>
<author>
<name>Michael Swiger</name>
<email>mokkan@gmail.com</email>
</author>
<published>2021-07-05T20:52:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=7ac62ebda1858875fc5f2de4ed694072aa739eb7'/>
<id>7ac62ebda1858875fc5f2de4ed694072aa739eb7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix indicator buffer not resizing after display powers off</title>
<updated>2021-07-05T20:56:20+00:00</updated>
<author>
<name>Michael Swiger</name>
<email>mokkan@gmail.com</email>
</author>
<published>2021-06-28T03:46:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=4088033ff6d5731dea2ab3093de58c0b22d26c75'/>
<id>4088033ff6d5731dea2ab3093de58c0b22d26c75</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Ensure buffer size is multiple of buffer scale</title>
<updated>2021-07-05T12:43:26+00:00</updated>
<author>
<name>Simon Plakolb</name>
<email>s.plakolb@gmail.com</email>
</author>
<published>2021-05-31T23:49:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=9754241080c326584303bee81547631062f9137f'/>
<id>9754241080c326584303bee81547631062f9137f</id>
<content type='text'>
An odd value of fe.height lead to the indicator disappearing. This was
due to the buffer size no longer being a multiple of the buffer scale.
This commit fixes the issue by checking both height and width to be a
multiple of scale.

This is done early to avoid excessive re-calls of create_buffer if the
buffer_height != new_height in render.c line 314 (now 318).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
An odd value of fe.height lead to the indicator disappearing. This was
due to the buffer size no longer being a multiple of the buffer scale.
This commit fixes the issue by checking both height and width to be a
multiple of scale.

This is done early to avoid excessive re-calls of create_buffer if the
buffer_height != new_height in render.c line 314 (now 318).
</pre>
</div>
</content>
</entry>
<entry>
<title>Draw ring and inner fill separately</title>
<updated>2021-06-22T17:30:11+00:00</updated>
<author>
<name>loserMcloser</name>
<email>reebydobalina@gmail.com</email>
</author>
<published>2021-05-31T21:01:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=bac71d9c8de38f4b60c347fc2b5b0684d6ebbef8'/>
<id>bac71d9c8de38f4b60c347fc2b5b0684d6ebbef8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix some typos</title>
<updated>2021-04-12T19:28:59+00:00</updated>
<author>
<name>Elyes HAOUAS</name>
<email>ehaouas@noos.fr</email>
</author>
<published>2021-04-12T16:21:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.prezmop.xyz/swaylock/.git/commit/?id=baa1ae99df3326cced7817951f99429a58428829'/>
<id>baa1ae99df3326cced7817951f99429a58428829</id>
<content type='text'>
Signed-off-by: Elyes HAOUAS &lt;ehaouas@noos.fr&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Elyes HAOUAS &lt;ehaouas@noos.fr&gt;
</pre>
</div>
</content>
</entry>
</feed>
