Fixed wayland buffer updates

The wayland buffer size always matches the current window size.
That might be different from the actual remote framebuffer size,
to when copying always use the correct strides to avoid distorted
screen content.
This commit is contained in:
Armin Novak
2019-01-24 15:10:08 +01:00
parent 0fd27e0e38
commit 823411c2f3
3 changed files with 45 additions and 7 deletions

View File

@@ -453,6 +453,16 @@ UWAC_API void* UwacWindowGetDrawingBuffer(UwacWindow* window);
UWAC_API UwacReturnCode UwacWindowAddDamage(UwacWindow* window, uint32_t x, uint32_t y,
uint32_t width, uint32_t height);
/**
* returns the geometry of the given UwacWindow buffer
*
* @param window the UwacWindow
* @param geometry the geometry to fill
* @param stride the length of a buffer line in bytes
* @return UWAC_SUCCESS on success, an Uwac error otherwise
*/
UWAC_API UwacReturnCode UwacWindowGetDrawingBufferGeometry(UwacWindow* window, UwacSize* geometry, size_t* stride);
/**
* Sends a frame to the compositor with the content of the drawing buffer
*