1
0
Fork 0
Commit graph

570 commits

Author SHA1 Message Date
Jasper St. Pierre
3548e6da73 Properly set the number of components on the CoglTextureRectangle
We need to set the number of components on the CoglTextureRectangle to
prevent wasting too much GPU memory. As we need to do this before we call
cogl_texture_set_region, just remove the meta_texture_rectangle_new wrapper,
and make callers call cogl_texture_rectangle_new_with_size directly.
2014-01-13 13:28:11 -05:00
Jasper St. Pierre
d2a1db8834 Update for Cogl API breaks 2014-01-13 13:07:11 -05:00
Andika Triwidada
fbec4718f8 Changed obsolete FSF postal address into generic URL.
Fix https://bugzilla.gnome.org/show_bug.cgi?id=721517 #2
2014-01-12 08:42:06 +07:00
Jasper St. Pierre
8e74880b55 window-actor: Fix optimization in get_paint_volume
We need to clip the paint volume to the unobscured region, not the
other way around...

https://bugzilla.gnome.org/show_bug.cgi?id=720630
2013-12-18 19:09:13 -05:00
Florian Müllner
27a0b8f87a Revert "Make tile preview a compositor plugin effect"
This reverts commit 21e94ed109.
2013-12-12 09:09:44 +01:00
Stefano Facchini
21e94ed109 Make tile preview a compositor plugin effect
https://bugzilla.gnome.org/show_bug.cgi?id=665758
2013-12-12 09:08:17 +01:00
Jasper St. Pierre
1db95bc32b Move _NET_WM_WINDOW_OPACITY handling to the standard window-props interface
This removes one X11 dependency that the MetaWindowActor interface has,
making it easier for us to use Wayland on this one...

https://bugzilla.gnome.org/show_bug.cgi?id=720106
2013-12-09 15:43:52 -05:00
Jasper St. Pierre
93a8933282 compositor: Remove atom_x_root_pixmap
It's unused

https://bugzilla.gnome.org/show_bug.cgi?id=720106
2013-12-09 15:43:16 -05:00
Jasper St. Pierre
5a63aaa5ac window-actor: Fix build
This was a bad rebase...
2013-12-09 14:17:06 -05:00
Jasper St. Pierre
a3eb5e562a window-actor: Move signal handler connections to the meta-window setter 2013-12-09 14:07:25 -05:00
Jasper St. Pierre
8a76383eca window-actor: Make the meta-window property construct-only
We don't deal with setting this property at all, and it's unlikely
to come up in future settings, so just don't allow setting it at all.

https://bugzilla.gnome.org/show_bug.cgi?id=678989
2013-12-09 14:06:13 -05:00
Jasper St. Pierre
734deeb17c window-actor: Remove meta-screen property
This can be inferred from the window. Don't allow anybody to set it.

https://bugzilla.gnome.org/show_bug.cgi?id=678989
2013-12-09 14:06:13 -05:00
Jasper St. Pierre
f8b4c28278 window-actor: Remove (private) xwindow property
This should make it easier to construct a MetaWindowActor from bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=678989
2013-12-09 14:06:13 -05:00
Jasper St. Pierre
3e179c07bc window: Add a simple meta_window_get_toplevel_xwindow utility
To replace all the places where we do:

  window->frame ? window->frame->xwindow : window->xwindow

or similar...
2013-12-09 14:06:13 -05:00
Jasper St. Pierre
56aae17b46 window-actor: Remove outdated code path
The shadow is added in the paint step, not as a separate actor,
so the raise is a no-op. It also gets rid of an annoying misspelling
that's driving me crazy.
2013-12-09 14:06:12 -05:00
Owen W. Taylor
55226ada8a MetaWindowGroup: fix paint volume
In the past, MetaWindowGroup was allocated the size of the screen and
painted the size of the screen because it contained the screen background,
but now we also have the "top window group" which contains only popup
windows, so the allocation doesn't properly reflect the paint bounds
of the window group. Compute the paint bounds accurately from the
children.

https://bugzilla.gnome.org/show_bug.cgi?id=719669
2013-12-05 09:02:44 -05:00
Jasper St. Pierre
899570d213 background-actor: Remove custom get_paint_volume
The paint volume should be based on what we paint, not what the content
wants to be painted as. Thus, it should be the allocation.
2013-12-03 14:32:28 -05:00
Jasper St. Pierre
47144253e4 cullable: Turn cull_out / reset_culling into a separate interface
Instead of hardcoded knowledge of certain classes in MetaWindowGroup,
create a generic interface that all actors can implement to get parts of
their regions culled out during redraw, without needing any special
knowledge of how to handle a specific actor.

The names now are a bit suspect. MetaBackgroundGroup is a simple
MetaCullable that knows how to cull children, and MetaWindowGroup is the
"toplevel" cullable that computes the initial two regions. A future
cleanup here could be to merge MetaWindowGroup / MetaBackgroundGroup so
that we only have a generic MetaSimpleCullable, and move the "toplevel"
cullability to be a MetaCullableToplevel.

https://bugzilla.gnome.org/show_bug.cgi?id=714706
2013-11-25 15:08:22 -05:00
Jasper St. Pierre
d8c66077f0 window-actor: Move the operations we need to do when we cull out here
Soon, we'll move this into a generic MetaCullable interface, but for
now, just put hardcoded knowledge in MetaWindowGroup.

https://bugzilla.gnome.org/show_bug.cgi?id=714706
2013-11-25 15:08:22 -05:00
Jasper St. Pierre
59a01137e1 window-group: Decompose culling operations into two methods
This also fixes a bug in the translation of clip_region.

We will add an interface for this soon, so we can recursively cull like this...

https://bugzilla.gnome.org/show_bug.cgi?id=714706
2013-11-25 15:08:22 -05:00
Jasper St. Pierre
b8938e9d4d window-actor: Fix a copy/paste typo 2013-11-21 17:36:20 -05:00
Jasper St. Pierre
7116d9cedb background-group: Fix cast warning 2013-11-21 16:07:51 -05:00
Jasper St. Pierre
66fb86fd0c background-group: Use the Clutter iteration APIs 2013-11-21 16:07:51 -05:00
Jasper St. Pierre
59cfbb07c8 background-group: Remove some unnecessary cruft 2013-11-21 16:07:51 -05:00
Owen W. Taylor
fbbc32422e Rename meta_window_get_outer_rect() to meta_window_get_frame_rect()
For clarity, rename meta_window_get_outer_rect() to match terminology
we use elsewhere. The old function is left as a deprecated
compatibility wrapper.
2013-11-19 13:28:23 -05:00
Robert Bragg
61881477ac Track the X Shape input region and use it for picking
We now track whether a window has an input shape specified via the X
Shape extension. Intersecting that with the bounding shape (as required
by the X Shape extension) we use the resulting rectangles to paint
window silhouettes when picking. As well as improving the correctness of
picking this should also be much more efficient because typically when
only picking solid rectangles then the need to actually render and issue
a read_pixels request can be optimized away and instead the picking is
done on the cpu.
2013-11-18 13:06:54 -05:00
Jasper St. Pierre
20beaf7fe1 compositor: Clean up comment
So it seems that we were intentionally delaying the output window,
although I wonder why...
2013-11-05 09:15:23 -05:00
Jasper St. Pierre
e72af50420 compositor: Initialize the plugin manager after initializing the output window
Plugins like gnome-shell may want to grab the output window immediately
before bouncing back to the mainloop.
2013-11-04 10:39:49 -05:00
Hans Petter Jansson
8af0e10aa4 shaped-texture: Use nearest-pixel interpolation if the texture is unscaled
Use nearest-pixel interpolation if the texture is unscaled. This
improves performance, especially with software rendering.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=708389
2013-10-10 02:38:52 +02:00
Adel Gadllah
36be084655 meta-window-actor: Fix offset calculation in queue_send_frame_messages_timeout
The current time offset calculation is wrong. It is supposed to calculate
the offset between the current time and the
"time where it message should be sent" (last_time + interval).

Fix the math to actually do that.

https://bugzilla.gnome.org/show_bug.cgi?id=709340
2013-10-07 20:24:16 +02:00
Owen W. Taylor
7b84590c71 MetaWindowActor: fix updates with multiple size changes in one frame
We must set size_changed even if we are frozen, as every window
size change makes the X server drop the pixmap, and we might lose
the information at the next thaw() if the window changes size
twice in one frame (so we would keep drawing with the old pixmap
until something else causes another resize)

Fix done together with Giovanni Campagna <gcampagn@redhat.com>
2013-09-25 13:13:19 -04:00
Pavel Vasin
4009267c2b shaped-texture: Fix memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=708070
2013-09-14 17:06:15 +02:00
Giovanni Campagna
ca6a1aac2b MetaPluginManager: don't require plugins to pass events to clutter
We don't want the shell to know if it's running on ClutterX11 or
not, so we should forward the event ourselves.

https://bugzilla.gnome.org/show_bug.cgi?id=707482
2013-09-10 17:25:22 +02:00
Adel Gadllah
f96dc97c4f window-actor: Use more conservative paint volume
We know which part of the window is not obscured, so take advantaged of that
to limit the size of the paint volume that we report.
2013-09-04 19:53:22 +02:00
Neil Roberts
c5bf60eab4 Don't create a dummy texture for the texture pipeline template
The meta_create_texture_pipeline function used to create a dummy 1x1
texture so that it could make sure that the all of the state that
affects the shader generation would be set on the template pipeline so
that Cogl could share the pipeline's shader with any other pipelines
that are just rendering a texture. This is no longer necessary because
the only thing that affects the shader generation is the texture type,
not the actual texture data and Cogl now has a function to explicitly
set the texture type which we can use instead. Additionally even if
the template mechanism is not used at all Cogl will still end up
reusing the same shader because it now has a shader cache which is
indexed by the pipeline state so pipeline's don't strictly need to
share ancestry in order to take advantage of it. However we still
might as well use the function because if there is a common ancestry
it is faster to look up the shader because Cogl doesn't need to hash
the pipeline state.

https://bugzilla.gnome.org/show_bug.cgi?id=707458
2013-09-04 14:23:51 +01:00
Jasper St. Pierre
4a11f126cd compositor: Remove some uninitialized variables 2013-09-03 16:09:25 -04:00
Ray Strode
ddf566a3c4 compositor: initial has_window to FALSE in sync_actor_stacking
Spotted by Jasper, discussed on IRC.
2013-09-03 16:03:17 -04:00
Jasper St. Pierre
7050b97d94 shaped-texture: Actually fetch rectangles from the blended_region
We checked for the blended region but actually fetched rectangles from
the clip region.

https://bugzilla.gnome.org/show_bug.cgi?id=707090
2013-08-29 18:36:35 -04:00
Jasper St. Pierre
23e9947f7a shaped-texture: Prevent no clip region from being used as an empty clip region
cairo_region_copy, while valid to call on a NULL pointer, gives us an empty
region instead of an infinitely big region, so the interesction won't give
us what we want. Just check for this case explicitly.

https://bugzilla.gnome.org/show_bug.cgi?id=707081
2013-08-29 15:26:14 -04:00
Jasper St. Pierre
ab4c929a07 shaped-texture: Turn blending off when drawing entirely opaque regions
When drawing entirely opaque regions, we traditionally kept blending on
simply because it made the code more convenient and obvious to handle.
However, this can cause lots of performance issues on GPUs that aren't
too powerful, as they have to readback the buffer underneath.

Keep track of the opaque region set by windows (through _NET_WM_OPAQUE_REGION,
standard RGB32 frame masks or similar), and draw those rectangles
separately through a different path with blending turned off.

https://bugzilla.gnome.org/show_bug.cgi?id=706930
2013-08-28 11:11:34 -04:00
Jasper St. Pierre
c251ab5092 shaped-texture: Use non-deprecated cogl APIs
https://bugzilla.gnome.org/show_bug.cgi?id=706930
2013-08-28 11:11:33 -04:00
Jasper St. Pierre
57258dc1d4 shaped-texture: Simplify pipeline creation
Split out pipeline creation to a separate function so that we don't
have so much dense code in the paint function itself, and remove some
indentation levels.

Also, don't use our own template for the unmasked pipeline, since it
has nothing different from the default pipeline template.

We also don't store the pipelines anymore since their creation isn't
really helping us; we set the mask texture and paint texture on every
paint anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=706930
2013-08-28 11:11:33 -04:00
Jasper St. Pierre
f1df49ad17 Refactor how shapes are done
As part of Wayland support, we should hold the shape and opaque regions
on the MetaWindow rather than fetching them in the MetaWindowActor, as
this gives us better flexibility as to where the regions are set, and
allows for easier Wayland support.

To make merging easier with the Wayland branch, we also append the _x11
suffix to functions that use the X SHAPE extension to fetch the shaped
regions.

https://bugzilla.gnome.org/show_bug.cgi?id=706930
2013-08-28 11:11:33 -04:00
Jasper St. Pierre
9d8e7371fb window-actor: Use g_clear_pointer 2013-08-28 11:11:04 -04:00
Jasper St. Pierre
84a1b394a1 shaped-texture: Remove an unnecessary set to NULL 2013-08-27 17:18:38 -04:00
Jasper St. Pierre
4ea8b91e0b shaped-texture: Fix indentation 2013-08-27 16:50:25 -04:00
Jasper St. Pierre
8e1e0fc344 shaped-texture: Remove bad comment
We do not assume ownership of the clip region anymore.
2013-08-27 16:50:25 -04:00
Adel Gadllah
6393789345 meta-window-actor: Fix spacing 2013-08-27 21:24:02 +02:00
Adel Gadllah
d0210c1a97 meta-window-actor: Throttle obscured frame synced apps
We must send frame_drawn and frame_timing messages to even when
we don't actually queue a redraw on screen to comply with the
WM sync spec.

So throttle such apps to down to a ~100ms interval.

https://bugzilla.gnome.org/show_bug.cgi?id=703332
2013-08-27 16:50:38 +02:00
Adel Gadllah
691c107ce9 meta-shaped-texture: Don't queue redraws for obscured regions
When we get a damage event we update the window by calling
meta_shaped_texture_update_area which queues a redraw on the actor.
We can avoid that for obscured regions by comparing the damage area to
our visible area.

This patch causes _NET_WM_FRAME_DRAWN messages to be not sent in some cases
where they should be sent; they will be added back in a later commit.

https://bugzilla.gnome.org/show_bug.cgi?id=703332
2013-08-27 16:50:33 +02:00