[waffle] [PATCH 00/17 v2] Add new public function waffle_window_create2 (v2)
Chad Versace
chad.versace at intel.com
Sun Jan 4 14:02:53 PST 2015
This patch series is available at
git://github.com/chadversary/waffle refs/tags/waffle_window_create2-v02
Today, waffle_window() has only two parameters: width and height.
Frank Henigman wants to extend Waffle's GBM backend with the ability to
post window contents to the display. Multiple methods exist for posting
content to the screen with the drm API, and that method should be
configurable per waffle_window. Therefore, we need to be able to pass
additional attributes to waffle_window_create().
It would also be nice to specify at time of creation that the
waffle_window should be full screen. Again, we need to pass additional
attributes to waffle_window_create().
The new function waffle_window_create2() is conceptually equivalent to
the original waffle_window_create() with the addition of an attrib_list
parameter. The only supported attributes are currently
WAFFLE_WINDOW_WIDTH and WAFFLE_WINDOW_HEIGHT.
I tested the new function on GLX, X11/EGL, Wayland, and GBM.
I have not yet tested the build on Windows, Android, or Mac. Before merging
this series, I will ensure it doesn't break the build on those platforms. I
don't have the ability to actually test on Android or Windows, though.
v2:
- Deprecate public waffle_attrib_list functions.
- Remove code duplication between int32_t and intpr_t variants of
wcore_attrib_list functions. [requested by fjhenigman]
- Implement waffle_window_create by calling waffle_window_create2. [fjhenigman]
- Be smarter about arithmetic overflows when allocating memory.
- Handle malloc failure. [emil]
- Fix some #include placements. [emil]
Chad Versace (17):
include: Define macro WAFFLE_DEPRECATED_1_06
include: Deprecate waffle_attrib_list funcs
core: Rename functions s/wcore_attrib_list/wcore_attrib_list32/
core: Change return type of wcore_attrib_list32_length
core: Define wcore_attrib_list funcs with type-generic template
core: Define intptr_t variants of wcore_attrib_list functions
core: Add arithmetic functions that detect overflow
core: Add func wcore_attrib_list_from_int32
waffle: Fix mismatch in waffle_window_create prototype
waffle: Fix signature of wcore_platform::window::create()
core: Add func wcore_error_bad_attribute
core: Add attrib_list param to func wcore_platform::window::create
core: Add func wcore_attrib_list_copy()
core: Add func wcore_attrib_list_pop()
waffle: Add public func waffle_window_create2()
tests/gl_basic: Update to use waffle_window_create2()
examples/gl_basic: Update to use waffle_window_create2()
examples/gl_basic.c | 10 +-
include/waffle/waffle.h | 34 +++-
man/waffle_attrib_list.3.xml | 14 +-
man/waffle_enum.3.xml | 7 +
man/waffle_window.3.xml | 27 +++
src/waffle/android/droid_window.c | 10 +-
src/waffle/android/droid_window.h | 4 +-
src/waffle/api/waffle_attrib_list.c | 8 +-
src/waffle/api/waffle_window.c | 76 ++++++++-
src/waffle/cgl/cgl_window.h | 5 +-
src/waffle/cgl/cgl_window.m | 13 +-
src/waffle/core/wcore_attrib_list.c | 237 +++++++++++++++++++++------
src/waffle/core/wcore_attrib_list.h | 45 ++++-
src/waffle/core/wcore_attrib_list_unittest.c | 112 ++++++-------
src/waffle/core/wcore_config_attrs.c | 10 +-
src/waffle/core/wcore_error.c | 8 +
src/waffle/core/wcore_error.h | 4 +
src/waffle/core/wcore_platform.h | 5 +-
src/waffle/core/wcore_util.c | 24 +++
src/waffle/core/wcore_util.h | 26 +++
src/waffle/gbm/wgbm_window.c | 11 +-
src/waffle/gbm/wgbm_window.h | 5 +-
src/waffle/glx/glx_window.c | 11 +-
src/waffle/glx/glx_window.h | 5 +-
src/waffle/wayland/wayland_window.c | 11 +-
src/waffle/wayland/wayland_window.h | 5 +-
src/waffle/wgl/wgl_window.c | 15 +-
src/waffle/wgl/wgl_window.h | 9 +-
src/waffle/x11/x11_window.c | 4 +-
src/waffle/x11/x11_window.h | 4 +-
src/waffle/xegl/xegl_window.c | 11 +-
src/waffle/xegl/xegl_window.h | 5 +-
tests/functional/gl_basic_test.c | 9 +-
33 files changed, 609 insertions(+), 175 deletions(-)
--
2.2.0
More information about the waffle
mailing list