diff options
author | Mathias Fiedler <mathias_fiedler@mentor.com> | 2017-06-01 11:07:29 +0200 |
---|---|---|
committer | Mathias Fiedler <mathias_fiedler@mentor.com> | 2017-06-23 09:37:20 +0200 |
commit | 03d6e58d5f94b49f4196838226ba63d1be72d05e (patch) | |
tree | 13be45ef7cc4330bc09364f0a425392bc03e14e6 /weston-ivi-shell/CMakeLists.txt | |
parent | 892b744589fe9e7371eb0c0ff33192db1c978b09 (diff) | |
download | wayland-ivi-extension-03d6e58d5f94b49f4196838226ba63d1be72d05e.tar.gz |
weston-ivi-shell: implement new ivi-wm screenshot requests
With the new ivi-wm screenshot requests the server needs to send either
a 'done' or an 'error' event on the ivi_screenshot object which is
created with the screenshot request.
The done event contains a filedescriptor for a file containing raw
pixeldata. The event also has parameters describing width, height,
stride and format of the pixeldata.
In case of an error an 'error' event is send instead.
Two new local helper functions are introduced, create_screenshot_file()
and flip_y().
Function create_screenshot_file() will create a file with temporary name
in the XDG_RUNTIME_DIR. It will furthermore resize the file to the
required size using fallocate or ftruncate similar to
os_create_anonymous_file in weston.
Function flip_y flips the pixel data upside down. This helper is used
for pixeldata read from outputs when needed.
Signed-off-by: Mathias Fiedler <mathias_fiedler@mentor.com>
Diffstat (limited to 'weston-ivi-shell/CMakeLists.txt')
-rw-r--r-- | weston-ivi-shell/CMakeLists.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/weston-ivi-shell/CMakeLists.txt b/weston-ivi-shell/CMakeLists.txt index 7d1123b..0288b58 100644 --- a/weston-ivi-shell/CMakeLists.txt +++ b/weston-ivi-shell/CMakeLists.txt @@ -40,6 +40,8 @@ endif (IVI_SHARE) INCLUDE (CheckFunctionExists) +CHECK_FUNCTION_EXISTS(posix_fallocate HAVE_POSIX_FALLOCATE) + configure_file(src/config.h.cmake config.h) GET_TARGET_PROPERTY(IVI_EXTENSION_INCLUDE_DIRS ivi-extension-protocol INCLUDE_DIRECTORIES) |