Commit Graph

6213 Commits

Author SHA1 Message Date
37697f1817 gdkgl: Use a GdkTexturedQuad struct to paint quads
We'll soon have a new function that paints multiple quads.
2014-11-22 09:40:10 -08:00
28846536cb gdkgl: Clean up program-manipulating code
Abstract the program ID and locations into a "program struct" which
we then use.
2014-11-22 09:29:27 -08:00
3f0c84f7ad gdkwindow: Clean up whitespace slightly
This has been bothering me for a while.
2014-11-22 08:12:22 -08:00
8976e84ded gdkwindow: Don't pass the region to the impl when beginning a paint
It's unused. At the same time, rename "begin_paint_region" to
"begin_paint". This will help us clean up how GDK painting works
in the future to allow more creative use of double-buffering.
2014-11-22 08:08:34 -08:00
ec2925a5bf quartz: Don't bother storing the paint_clip_region
It's unused.
2014-11-22 08:07:28 -08:00
1730bb0e81 mir: initialize surface name with program name 2014-11-21 04:46:47 +01:00
442adf6359 GL: Fix typo in gdk_gl_texture_from_surface
Got a sign wrong in commit 800c712738
2014-11-20 15:37:40 +01:00
cf94da2ca1 GdkGLContext: Remove unused update vfunc
The update virtual function for GdkGLContext is unused and is a
leftover from a previous GL approach. Just remove it.

https://bugzilla.gnome.org/show_bug.cgi?id=739750
2014-11-20 12:38:04 +01:00
800c712738 GL: Fix GL Y coordinate flipping to use unscaled window height
This is needed in the edge case where the X11 backend rounded the actual
size, and the GL flipping really needs the correct window height to
do proper Y coordinate flipping.

https://bugzilla.gnome.org/show_bug.cgi?id=739750
2014-11-20 12:38:04 +01:00
1eb3b34bce Add gdk_window_get_unscaled_size
This is required for the X backend GL integration. If the
window has a height that is not a multiple of the window scale
we can't properly do the y coordinate flipping that GL needs.
Other backends can ignore this and use the default implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=739750
2014-11-20 12:38:04 +01:00
788478dff9 x11: Return the exact pixel coverage in get_frame_extents
Rather than just rounding down the position *and* the size separately
we correctly calculate a rectangle in scaled window coords that fully
covers the real window size. This really only makes a difference
when the window size/position isn't a multiple of the window scale.

https://bugzilla.gnome.org/show_bug.cgi?id=739750
2014-11-20 12:38:04 +01:00
bd643e0e1a x11: Keep track of the exact size in X pixels of windows
Keep track of the exact size of X windows in underlying pixels; we
generally use the scaled size instead, but to properly handle the GL
viewport for windows that aren't a multiple of window_scale,
we need to know the real size.

https://bugzilla.gnome.org/show_bug.cgi?id=739750
2014-11-20 12:38:04 +01:00
608c25453b x11: round the scaled size *up* when we get a ConfigureNotify
Although we specify a resize increment to try and get a size that is
a multiple of the window scale, maximization typically wins
over the resize increment, so the window might be odd sized.

Round *up* in this case, rather than down, since it's better to
truncate a line or two at the bottom and right of the window rather
than have a line or two that we don't know what to do with.

https://bugzilla.gnome.org/show_bug.cgi?id=739750
2014-11-20 10:19:27 +01:00
f5d96f7110 mir: use proper naming for mir window type checking macro 2014-11-20 05:51:12 +01:00
99d849412b mir: add public getter for the internal MirSurface 2014-11-20 04:41:45 +01:00
60e185e496 mir: don't use struct MirConnection*, just the latter 2014-11-20 04:41:06 +01:00
6e9db05601 mir: add OpenGL support
Implement GdkGLContext using EGL and use hardware mir surfaces
when a GdkWindow uses gl rendering.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=740346
2014-11-20 04:33:38 +01:00
e0e46a4f6b mir: update surface type based on events 2014-11-17 17:23:36 +01:00
da8fdab87b mir: fix typo in GDK_IS_WINDOW_MIR definition 2014-11-17 14:02:22 +01:00
acfc4f8910 mir: invert scrolling delta 2014-11-17 14:02:22 +01:00
f5c5e9385e mir: handle more surface types 2014-11-14 23:19:15 +01:00
8bc523ef59 mir: fix compilation in mirscreen 2014-11-14 23:19:15 +01:00
61286d5927 gdk/gdkgl.c: Fix Typo
The extra ';' actually broke builds on C89 compilers...
2014-11-14 17:26:29 +08:00
c42146d88c mir: get/set window surface type 2014-11-13 04:42:48 +01:00
c7e7e35083 mir: don't request more surface formats than the supported ones 2014-11-13 03:59:29 +01:00
4e4ccb76cd mir: implement screen get_plug_name 2014-11-13 02:26:38 +01:00
a77571c42e mir: clear screen objects correctly 2014-11-13 02:19:29 +01:00
0d024c2df8 mir: don't crash when querying infos for an invalid monitor 2014-11-13 02:07:46 +01:00
c8826ba8c7 mir: clear screen data 2014-11-13 01:59:21 +01:00
98a8c66970 mir: correctly get screen mm sizes 2014-11-13 01:47:56 +01:00
c6de20496c mir: unset config change callback on finalize 2014-11-13 01:34:10 +01:00
92c2e99dda mir: actually pass the GdkMirScreen to display config change cb 2014-11-13 01:30:10 +01:00
d9b02ea4a3 gdk: Make debug-updates a per-display setting
Add private API to set this per-display, and make the existing
gdk_window_set_debug_update function set a global default.
2014-11-10 15:23:14 -05:00
5536d9bcde gdk: Add private API for rendering mode
This will be used to expose rendering mode in the inspector.
2014-11-10 14:39:57 -05:00
8338b7e4cd Move rendering mode into GdkDisplay
This is in preparation for making it runtime-settable in the
inspector.
2014-11-10 14:28:43 -05:00
710f332082 configure.ac: Depend on cairo 1.14.0
This is needed for cairo_set_device_scale()
2014-11-10 15:12:17 +00:00
90555e06be gdk_window_end_paint: Flush destination surface after paint
It seems in cairo 1.14 we need this after having painted an image surface
to a X11 window surface (i.e. with GDK_RENDERING=image).
2014-11-10 15:25:31 +01:00
cdcd3ca359 Hide GdkWindow libgtk_only API in the private vtable
These are the last two global GDK symbols that have a libgtk_only
suffix.

https://bugzilla.gnome.org/show_bug.cgi?id=739781
2014-11-08 00:20:15 -05:00
585af218a3 Move GDK GL flags accessors to the private vtable
This allows us to use the GDK_PRIVATE_CALL macro inside gtk.

https://bugzilla.gnome.org/show_bug.cgi?id=739781
2014-11-08 00:20:15 -05:00
eedbec2066 Make global GDK libgtk_only functions more private
The current way of exposing GDK API that should be considered internal
to GTK+ is to append a 'libgtk_only' suffix to the function name; this
is not really safe.

GLib has been using a slightly different approach: a private table of
function pointers, and a macro that allows accessing the desired symbol
inside that vtable.

We can copy the approach, and deprecate the 'libgtk_only' symbols in
lieu of outright removal.

https://bugzilla.gnome.org/show_bug.cgi?id=739781
2014-11-08 00:20:15 -05:00
433120ae5e gdkwindow-x11: Fix indentation 2014-11-07 17:39:43 -08:00
af6eab850e wayland: Schedule a clock tick instead of wl_surface_commit()ting directly
Instead of possibly calling wl_surface_commit() out of
GdkFrameClock::after-paint, tick the transient parent clock so ::after-paint
can be eventually run.

This ensures that the subsurface coordinates (considered part of the state
of the parent) aren't committed untimely, and guaranteed to be orderly with
the wl_subsurface-relative state.

This is a gtk-side fix for https://bugzilla.gnome.org/show_bug.cgi?id=738887
2014-11-07 17:24:10 +01:00
964abf7423 wayland: Don't translate a NULL region into an empty one
cairo_region_copy(NULL) will effectively return an empty region, as this
function is always meant to return valid memory. This however inverts the
meaning of the NULL region and results in entirely non-clickable windows.
2014-11-07 17:23:54 +01:00
7e405c286f Don't make the gl flags API
We need to export the symbols so they can be used in the
inspector, but we don't really want to make this supported
public API, so keep them out of installed headers.
2014-11-07 07:10:49 -05:00
5d0d1e524e Export API to set GL flags
This will be used in the inspector.
2014-11-06 23:29:16 -05:00
22ad7b7782 gdkgl: Make some helper functions static 2014-11-06 13:48:20 -08:00
ec729d0649 mir: rework cursors a bit
Store the cursor name on the cursor (rather than always using its type).

Use this when setting a cursor on a surface.

The mir server will fallback to using standard cursors from the cursor
theme if the name used is not one of those defined by mir, which is more
or less what we want to happen here in case of creating a cursor by
name.
2014-11-06 16:18:53 -05:00
2fdb266c0d mir: set cursor 2014-11-06 16:18:53 -05:00
41bf293efd GdkWindow: Drop gl matrix setup which is not needed anymore. 2014-11-06 20:37:24 +01:00
61eabc4778 gdk_gl_texture_from_surface: Enable scissor test 2014-11-06 20:37:10 +01:00