Refine the API of fill_rectangle and rename it to fill.
Extras:
Keep GL_BLEND enabled; Fixed some texture/fbo leaks
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Implement image processing in gl_compose using a frag shader.
gl_image_op is used to set flags corresponds to what processing is
needed for a texture.
Also implement proper reference counting for textures.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This is basically just adapting old code to the new interface. A lot
of the functions are still stubs, but the basic stuffs is working.
What remains to be done:
* Implement gl_image_op. (It should do the operation lazily, only update
the flags on the texture. Actual processing will be delayed until composition.)
* Implement gl_copy. Now it just return the same image after incrementing the
refcount. It should actually copy the image data structure so it can have a
separate set of flags.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Instead of storing them as an array of xfixed.
Might cause some performance overhead for the new backend, because
it is allocating a buffer to do the conversion every frame. Will fix
later.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit introduced a new, modular backend interface. The interface
is not very good, since I don't think I fully understand all the
requirements writing a backend have. But this is a good first step.
This commit also includes an initial xrender backend written using the
new interface, and some opengl backend related helper functions, which
are taken from the old opengl backend.
However, there is not integration with the core compton yet. compton
will still use the old backend code. This commit is here so we can get
the automated build test.
What is implemented in the new xrender backend:
* Windows with transparency
* Shadow
* Opacity
* Wallpaper (getting the root pixmap)
* Blur
Known problem with the xrender backend:
* It is slower
Things that still need to be figured out:
* What is the better way to add vsync to the new backends
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>