The easiest things trigger the silliest mistakes. Add tests
for various properties we want our transfer functions to have,
such as:
- be inverse of each other
- stay within the defined ranges
- by symmetric around 0
Set primaries without name if supported, when named primaries are not.
But prefer named primaries if available.
This is just an attempt at defensive coding.
If we get sent primaries with the values as named primaries, treat them
like named primaries.
Fixes colorstate support on Kwin, which never sends named primaries.
If the texture covers all of the black background (like when watching a
1080p stream fullscreen on a 1080p monitor) we don't need a compositor
with single pixel support.
Fixes offloading in Kwin.
There's a ton of error checking happening that we want to do.
Because it turns out it is not really useful to create a subsurface for
the single pixel buffer when we don't even support single pixel buffers.
begin_frame_full does not return a reference, we assume that the
color state is staying alive for the duration of the frame anyway,
so end_frame simply sets priv->color_state to NULL.
We need to round outwards and a 1x1 rectangle with offset 0.5,0.5 should
end up as a 3x3 rectangle with offset 0,0 when rounded, not as a 2x2
rectangle.
We need to round outwards and a 1x1 rectangle with offset 0.5,0.5 should
end up as a 3x3 rectangle with offset 0,0 when rounded, not as a 2x2
rectangle.
The backbuffer's damage region is the region of the backbuffer
that doesn't contain up-to-date contents. This is determined
by the backbuffer's age and previous frame's paint regions.
This enables incremental rendering
On Windows, always use gtk_show_uri_win32 () instead of going through
GAppInfo. Hook up gtk_file_launcher_launch () to gtk_show_uri_win32 ()
as well, always extracting the file path (and not a URI) and propagating
the always-ask flag.
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
This is a new internal utility to open/show/launch/execute URIs and
files on Windows, using Windows's native ShellExecuteEx () and
SHOpenWithDialog () APIs.
The advantages this has over using the win32 implementation of
g_app_info_launch_default_for_uri ():
* the implementation here is fairly simple;
* it doesn't involve trying to grok the registry for app / file type
registrations (at least not inside GLib/GTK side, the implementations
of ShellExecuteEx/SHOpenWithDialog presumably do that internally);
* it doesn't require convoluted formatting / escaping of invocation
command lines that GWin32AppInfo / gspawn-win32 has to do otherwise
(again, presumably the Windows libraries implement this internally);
* it's certain to end up opening the file/URI the same way other apps
in the system would;
* it can/will open the native system UI for picking an app in case there
are multiple options (or when so requested programmatically with the
always-ask flag), or if there is no app installed that can handle the
URI scheme / file type;
* it lets us pass the parent window handle, much like the portal APIs;
presumably Windows would use this for positioning the picking UI, or
placing the launched app's window;
* presumably, this will properly elevate privileges with a User Access
Control (UAC) prompt if the app being launched requires administrator
access; this presumably is impossible with the wspawn* APIs that
gspawn-win32 uses;
* this has a much better chance to work properly with the win32 app
isolation (AppContainer) technology.
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>