Keep image on vram if at all possible with wlroots based compositors

This commit is contained in:
Loki
2021-08-26 22:06:59 +02:00
parent ec184fb2ab
commit b59df48dde
8 changed files with 280 additions and 121 deletions

View File

@@ -8,10 +8,18 @@ namespace egl {
struct surface_descriptor_t;
}
namespace va {
std::shared_ptr<platf::hwdevice_t> make_hwdevice(int width, int height);
std::shared_ptr<platf::hwdevice_t> make_hwdevice(int width, int height, file_t &&card, int offset_x, int offset_y, const egl::surface_descriptor_t &sd);
/**
* Width --> Width of the image
* Height --> Height of the image
* offset_x --> Horizontal offset of the image in the texture
* offset_y --> Vertical offset of the image in the texture
* file_t card --> The file descriptor of the render device used for encoding
*/
std::shared_ptr<platf::hwdevice_t> make_hwdevice(int width, int height, bool vram);
std::shared_ptr<platf::hwdevice_t> make_hwdevice(int width, int height, int offset_x, int offset_y, bool vram);
std::shared_ptr<platf::hwdevice_t> make_hwdevice(int width, int height, file_t &&card, int offset_x, int offset_y, bool vram);
// Ensure the render device pointed to by fd is capable of encoding h264
// Ensure the render device pointed to by fd is capable of encoding h264 with the hevc_mode configured
bool validate(int fd);
int init();