This ensures correct texture filtering, simplifies the render callback,
and allows us to remove the custom draw flag, restoring the direct
rendering optimization for filters against image sources.
Add support for applying alpha in linear space to match Photoshop
behavior in linear mode, and for just overall correctness. The default
setting is still nonlinear to match common user expectation though.
Both image and color sources have been updated.
Also added alpha support to the color source. Useful for users, and
serves as an easy alpha blending test case.
If an image source isn't visible there is no point polling for changes
during the time it's hidden as no one will see them. Should the image
be on unreachable media such as an unavailable network share, this
check would cause the graphics thread to periodically stall trying to
detect changes of a non-visible image source.
If the image is modified while it's hidden, the updated file will now
be loaded as soon as the source is made visible - the update timer
intentionally ticks up while hidden.
Partially fixes some of the behavior described in
https://github.com/obsproject/obs-studio/issues/3007, a full fix
likely requires significant changes to support OS-specific file change
notification APIs.
(This also modifies image-source, obs-text, text-freetype2, and UI)
This improves source definition versioning. To do this, it now stores
two identifier names. One "unversioned" which is the original name, and
one "versioned" with the version number appended.
This fixes both backward compatibility with older OBS versions, and
fixes the inability to use "add existing" in OBS itself on sources
created from older version definitions.
The problem with using obs_get_video_info for a default is that the user
can change that value. A default should not be a value that is subject
to change based upon the user's settings.
Instead, choose a sane "normal" value, like 1920x1080. Later on, this
should be replaced with a system that allows automatic resizing via the
user.
This reverts commit 46c5780a77.
This needs to be reverted for now because users who did not set a size
on it (left it at default and just stretched it) will now suddenly have
the source's size change out of nowhere. There needs to be backward
compatibility implementation for this.
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed. Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.