Re: [waffle] [PATCH 07/10] waffle: add full screen window request

2015-04-23 Thread Emil Velikov
On 22 April 2015 at 20:26, Chad Versace wrote:
 On Fri 10 Apr 2015, Emil Velikov wrote:
 On 09/04/15 22:48, Chad Versace wrote:
  On Mon 30 Mar 2015, Frank Henigman wrote:

  diff --git a/include/waffle/waffle.h b/include/waffle/waffle.h
  index 297a487..df0218e 100644
  --- a/include/waffle/waffle.h
  +++ b/include/waffle/waffle.h
  @@ -172,6 +172,7 @@ enum waffle_enum {
 
  WAFFLE_WINDOW_WIDTH = 0x0310,
  WAFFLE_WINDOW_HEIGHT= 0x0311,
  +WAFFLE_WINDOW_FULLSCREEN=
  0x0312,
 
  wcore_enum_to_string must be taught about the new enum.
 
 Hi Chad,

 Should one wrap the new enum in #if WAFFLE_API_VERSION = 0x1070 ? Or it
 only makes sense for new entry points into the waffle library ?
 Considering that WAFFLE_WINDOW_{WIDTH,HEIGHT} went in without the API
 guard, I'm leaning towards the latter.

 I'm unsure. Other libraries that use feature test macros, what do they
 do? For the record, when adding WAFFLE_CONTEXT_FORWARD_COMPATIBLE and
 WAFFLE_CONTEXT_DEBUG, I guarded those with 0x0130. But I'm open to
 guarding only entry points if that makes more sense.

That's the key that brought us here in the first place ;-) From a
quick look at my /usr/include all of the feature test macros are used
to guard structs (be that new ones or ABI changes) and functions
prototypes. Haven't seen one guarding enums/defines.

 I think we should research what other libraries do before committing to
 a decision.

Personally I would opt for dropping the guards in enums
 - GDK, xfixes, jpeglib guards only structs/functions,
 - anyone can provide a dummy/invalid value, it's up-to the API to
disregard/ignore it :-)

 Speaking of which what is the status of waffle_display_print_info() ?
 Mostly curious than anything else.

 I CC'd you today on the relevant thread.
My humble question has served its purpose - the discussion is back on :-)


Cheers
Emil
___
waffle mailing list
waffle@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/waffle


Re: [waffle] [PATCH 07/10] waffle: add full screen window request

2015-04-22 Thread Chad Versace
On Thu 16 Apr 2015, Frank Henigman wrote:
 On Thu, Apr 9, 2015 at 6:48 PM, Chad Versace chad.vers...@intel.com wrote:
  On Mon 30 Mar 2015, Frank Henigman wrote:
 
  You can now put WAFFLE_WINDOW_FULLSCREEN in the attribute list passed
  to waffle_window_create2() and get a full screen window.
  Only glx and x11_egl implemented so far.
 
 
  I like the idea of WAFFLE_WINDOW_FULLSCREEN. Comments below.
 
  +WAFFLE_WINDOW_FULLSCREEN= 0x0312,
 
 
  wcore_enum_to_string must be taught about the new enum.
 
 Done in v2 (sent separately).  Docs updated too.

Ok, I'll take a look at v2.

 On the topic of queries, I'd like to be able to query a window after
 creation, particularly to get the size that resulted from a full
 screen request, but other queries might be useful too.  How about
 analogues to eglQueryContext and eglQuerySurface?

Analogues to eglQueryContext and eglQuerySurface would indeed be useful.
___
waffle mailing list
waffle@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/waffle


Re: [waffle] [PATCH 07/10] waffle: add full screen window request

2015-04-22 Thread Chad Versace
On Fri 10 Apr 2015, Emil Velikov wrote:
 On 09/04/15 22:48, Chad Versace wrote:
  On Mon 30 Mar 2015, Frank Henigman wrote:
  You can now put WAFFLE_WINDOW_FULLSCREEN in the attribute list passed
  to waffle_window_create2() and get a full screen window.
  Only glx and x11_egl implemented so far.
  
  I like the idea of WAFFLE_WINDOW_FULLSCREEN. Comments below.
  
  Signed-off-by: Frank Henigman fjhenig...@google.com
  ---
  include/waffle/waffle.h|  1 +
  src/waffle/api/waffle_window.c | 69
  ++
  src/waffle/glx/glx_window.c| 12 ++--
  src/waffle/xegl/xegl_window.c  | 13 ++--
  4 files changed, 59 insertions(+), 36 deletions(-)
 
  diff --git a/include/waffle/waffle.h b/include/waffle/waffle.h
  index 297a487..df0218e 100644
  --- a/include/waffle/waffle.h
  +++ b/include/waffle/waffle.h
  @@ -172,6 +172,7 @@ enum waffle_enum {
 
  WAFFLE_WINDOW_WIDTH = 0x0310,
  WAFFLE_WINDOW_HEIGHT= 0x0311,
  +WAFFLE_WINDOW_FULLSCREEN=
  0x0312,
  
  wcore_enum_to_string must be taught about the new enum.
  
 Hi Chad,
 
 Should one wrap the new enum in #if WAFFLE_API_VERSION = 0x1070 ? Or it
 only makes sense for new entry points into the waffle library ?
 Considering that WAFFLE_WINDOW_{WIDTH,HEIGHT} went in without the API
 guard, I'm leaning towards the latter.

I'm unsure. Other libraries that use feature test macros, what do they
do? For the record, when adding WAFFLE_CONTEXT_FORWARD_COMPATIBLE and
WAFFLE_CONTEXT_DEBUG, I guarded those with 0x0130. But I'm open to
guarding only entry points if that makes more sense.

I think we should research what other libraries do before committing to
a decision.

 Speaking of which what is the status of waffle_display_print_info() ?
 Mostly curious than anything else.

I CC'd you today on the relevant thread.
___
waffle mailing list
waffle@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/waffle