1
0
Fork 0
Commit graph

912 commits

Author SHA1 Message Date
Jonas Ådahl
f01247d815 wayland: Fix calculation of window geometry when scaled
Take the surface actor scale into account when calculating the window
geometry.

https://bugzilla.gnome.org/show_bug.cgi?id=744934
2015-07-16 11:54:14 +08:00
Jonas Ådahl
3b993131e8 wayland: Fix subsurface positioning on HiDPI
Keep the active position state in its original coordinate space, and
synchronize the surface actor with it when it changes and when
synchronizing the rest of the surface state, in case the surface scale
had changed.

https://bugzilla.gnome.org/show_bug.cgi?id=745655
2015-07-16 11:43:19 +08:00
Jonas Ådahl
117f57f74c wayland: Factor out some parts of meta_surface_actor_wayland_get_scale
Put a toplevel window getter in meta-wayland-surface.h and a main
monitor scale getter in window-wayland.h.

https://bugzilla.gnome.org/show_bug.cgi?id=745655
2015-07-16 11:43:19 +08:00
Jonas Ådahl
5d10196919 MetaSurfaceActorWayland: Don't dereference surface before NULL check
Fixes regression introduced in ba7c524a18.

https://bugzilla.gnome.org/show_bug.cgi?id=744453
2015-07-15 17:10:48 +08:00
Jonas Ådahl
eb023ff2c9 wayland: Send wl_surface.enter and wl_surface.leave
Whenever a MetaSurfaceActor is painted, update the list of what outputs
the surface is being drawed upon. Since we do this on paint, we
effectively avoids this whenever the surface is not drawn, for example
being minimized, on a non-active workspace, or simply outside of the
damage region of a frame.

DND icons and cursors are not affected by this patch, since they are not
drawn as MetaSurfaceActors. If a MetaSurfaceActor or a parent is cloned,
then we'll check the position of the original actor again when the clone is
drawn, which is slightly expensive, but harmless. If the MetaShapedTexture
instead is cloned, as GNOME Shell does in many cases, then these clones
will not cause duplicate position checks.

https://bugzilla.gnome.org/show_bug.cgi?id=744453
2015-07-15 14:55:55 +08:00
Jonas Ådahl
ba7c524a18 MetaSurfaceActorWayland: Unset the MetaWaylandSurface pointer when it goes away
We may access it during painting even if it has been freed. For now,
manually unset it during the MetaWaylandSurface cleanup; in the future
make MetaWaylandSurface a GObject and make the surface pointer a weak
reference.

https://bugzilla.gnome.org/show_bug.cgi?id=744453
2015-07-15 14:55:55 +08:00
Jasper St. Pierre
a191554cf6 compositor: Export meta_shadow_factory_get_shadow to introspection
I forgot we had a separate list of headers for introspection to scan.
2015-07-06 00:27:03 -07:00
Jasper St. Pierre
b33a82eb7c Export the shadow factory
The elementary guys would like this as an API, and I don't see any
reason to refuse -- this is quite nice shadow painting code :)

For some reason, gobject-introspection can't seem to cope with
MetaWindowShape. I'll look into it a bit later, but for now, mark
the function it has trouble with as (skip).
2015-07-06 00:14:22 -07:00
Jasper St. Pierre
2705c87f74 window-group: Fix issues when translated
It seems that when translated, paint_offset and actor_offset will always
be the same, so our translation of the clip group won't work. For now,
until I figure out what's going on here, just use the painting offset,
since that what seems to make sense to me.

I didn't write this code, though, so I don't know why the actor's
allocation was involved in this computation at all.

I tested briefly with clones (magnifier, manual cloning through the
looking glass) and couldn't find any other artifacts, so I'm going to do
this for now.
2015-07-05 23:55:43 -07:00
Jasper St. Pierre
9fc1c919e8 window-actor: Replace no-shadow with a shadow-mode
The elementary guys want to be able to force shadows *on*, for use in
their overview.
2015-07-05 23:29:11 -07:00
Jasper St. Pierre
9f04c58ffe Implement a generic "size change" mechanism
A much less hacky version of maximize / unmaximize is reimplemented
in terms of this, but it could also eventually be used for fullscreen /
unfullscreen, and tile / untile.
2015-07-05 23:03:36 -07:00
Jasper St. Pierre
7de1f3a7be plugin-manager: Make the event an enum 2015-07-05 22:01:59 -07:00
Jasper St. Pierre
fd443ecf2a plugin-manager: Clean up an unused define 2015-07-05 22:01:59 -07:00
Jasper St. Pierre
e8dd5601e7 window-group: Turn clipped redraws back on
Whoops -- I commented this out for debugging reasons.
2015-07-05 19:19:33 -07:00
Jasper St. Pierre
ccca810daf window-group: Improve performance by hacking around Clutter
The comment explains it better, but Clutter tries to be smart and
repaint actors when their allocations change. Since the window group's
allocation changes when windows move around, this means that moving a
window will always cause a full-stage repaint, which is super slow.

Hack around this for now.
2015-07-05 19:18:22 -07:00
Jasper St. Pierre
693456b644 shaped-texture: Remove unnecessary copies of the pipeline 2015-07-05 15:01:15 -07:00
Jasper St. Pierre
aacc3d5628 shaped-texture: Repeat edge pixels instead of mirroring the image
While nothing will completely fix X11's artifacts, this tends to look a
bit better, *especially* with mask textures that have black at the
edges (which are most of them).

It's also faster for GPUs to manage.
2015-07-05 15:00:38 -07:00
Jasper St. Pierre
4c6866741d surface-actor-x11: Make sure to set a size when unredirected
When we're unredirected, we don't have a pixmap, and thus our allocation
becomes 0x0. So when events come in, they pass right through our actor,
going to the one underneath in the stack.

Fix this by having a fallback size on the shaped texture actor when
we're unredirected, causing it to always have a valid allocation.

This fixes clicking on stuff in sloppy / mouse mode focus.
2015-06-23 16:30:29 -07:00
Jasper St. Pierre
84baf4e181 shaped-texture: Clean up some internals
These are internal vfuncs, they don't need prechecks.
2015-06-23 16:18:38 -07:00
Rui Matos
7c5fe42835 meta-background: Add a function to refresh all background instances
We need to reload the FBOs under some circumstances, this adds a way
to easily do so.

https://bugzilla.gnome.org/show_bug.cgi?id=739178
2015-03-25 11:48:32 +01:00
Alban Browaeys
f858f66fe0 MetaBackgroundActor: glsl: do not mix int and float.
Implicit conversion from int to float is not supported by
GLSL ES.

Fixes:
(gnome-shell:8954): Cogl-WARNING **: Shader compilation failed:
1:2: P0004: High precision not supported, instead compiling high precision as medium precision
4:17: S0001: Type mismatch in arithmetic operation between 'int' and 'float'
when one trigger the overview mode on Mali 400 r1p1 GPU.

https://bugzilla.gnome.org/show_bug.cgi?id=745442
2015-03-03 22:09:35 +01:00
Jonas Ådahl
fffb863f37 wayland: Sync surface actor state when changing main monitor
In order to switch to the correct surface actor scale given the monitor
the surface is on, without relying on the client committing a new state
given some other side effect, sync the surface actor state when the main
monitor associated with the corresponding window changed.

https://bugzilla.gnome.org/show_bug.cgi?id=744933
2015-03-03 14:53:15 -05:00
Jonas Ådahl
bbcee174ce wayland: Make the surface actor set its own state
Since the surface actor knows more about how it draws itself, instead of
pushing texture state (buffer and scale), input region and opaque region
from MetaWaylandSurface after having transformed into what the surface
actor expects, make the surface actor set its own state given what state
the Wayland surface is in.

https://bugzilla.gnome.org/show_bug.cgi?id=744933
2015-03-03 14:53:15 -05:00
Chris Wilson
72f5a36522 compositor: Update composite overlay window before unredirecting
The current ordering updates the clip shape of the composite overlay
window after unredirecting the target window. This has the effect of
forcing X to clear the target window and sending an expose to the
application to repaint - causing an unsightly flash. If we update the
shape first, then unredirect, X restores the background of the root
window (sending no expose events as no one is interested) and the
background is typically NONE for the root window. Then the unredirect
paints the contents of the composite backing pixmap over top without
requiring a round trip and waiting for the client to repaint - thus no
flashing.

Fixes regression from

commit d6282716b2
Author: Jasper St. Pierre <jstpierre@mecheye.net>
Date:   Fri Dec 6 17:10:44 2013 -0500

    compositor: Simplify the unredirected window management code

Cc: Jasper St. Pierre <jstpierre@mecheye.net>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

https://bugzilla.gnome.org/show_bug.cgi?id=743858
2015-02-02 15:41:24 +01:00
Rui Matos
3f2d658f20 monitor-manager: Expose MetaMonitorManager to introspection
This just exposes the type and the singleton getter necessary to make
it available to introspection. We'll expose more functionality as it
becomes needed.

https://bugzilla.gnome.org/show_bug.cgi?id=743745
2015-01-30 13:13:49 -05:00
Jonas Ådahl
22c13b3144 plugins/Makefile.am: Don't fail when trying to remove nonexisting file
https://bugzilla.gnome.org/show_bug.cgi?id=743189
2015-01-19 09:37:54 -08:00
Owen W. Taylor
5e84c8f20b MetaWindowActor: don't overwrite send_frame_messages_timer
If the app finished multiple frames before we sent _NET_WM_FRAME_DRAWN,
we could add the send_frame_messages_timer multiple times. In the rare
case that the app immediately closed the window, the older timeout
could potentially then run on the freed actor.

https://bugzilla.gnome.org/show_bug.cgi?id=738686
2014-12-02 11:47:13 -05:00
Owen W. Taylor
9745f9f8ce Fix problems resulting in left-over queued frames
* Use -1 rather than 0 as a flag for pending queue entries; 0 is
  a valid frame_counter value from Cogl.
* Consistently handle the fact we can have more than one pending
  entry. It's app misbehavior to submit a new frame before
  _NET_WM_FRAME_DRAWN is received; but we accept such frame messages,
  so we can't just leak them.
* If we remove send_frame_message_timer, assign the current frame counter
  to pending entries.
* To try to avoid regressing on this, when sending _NET_WM_FRAME_TIMINGS
  messages, if we have stale messages, or messages with no frame drawn
  time, warn and remove them from the queue rather than just accumulating.
* Improve commenting.

https://bugzilla.gnome.org/show_bug.cgi?id=738686
2014-12-02 11:47:13 -05:00
Carlos Garnacho
e96eb0e82e compositor: Always recurse over surface children actors when picking
The parent pick() implementation in ClutterActor only recurses if the
vfunc is untouched, which means it's up to the MetaWaylandSurface
implementation to actually recurse, just the same as if an input mask
applied.

https://bugzilla.gnome.org/show_bug.cgi?id=738890
2014-11-24 14:44:11 +01:00
Florian Müllner
6e25c37da1 window-actor: Do not request unredirection when destroyed
WindowActors can outlive their corresponding window to animate unmap.
Unredirecting the actor does not make sense in that case, so make
sure to not request it.

https://bugzilla.gnome.org/show_bug.cgi?id=740133
2014-11-18 16:10:12 +01:00
Carlos Garnacho
700d367937 compositor: Ensure child actors are included in picking
If the actor surface has an input mask, custom picking is implemented
for the portions affected by the mask, although the child actors (most
usually subsurfaces) are left out.

https://bugzilla.gnome.org/show_bug.cgi?id=738890
2014-10-23 16:53:44 +02:00
Cosimo Cecchi
a37f632b1b background: use GFiles instead of filenames
We want to use GResources for system backgrounds, so move this to a
GFile.

https://bugzilla.gnome.org/show_bug.cgi?id=736936
2014-10-14 18:54:36 -07:00
Adel Gadllah
cd32e4a68a meta-surface-actor-x11: Fix unredirect heuristic
Damage coordinates are relative to the drawable not to the screen. So we
have to check whether x and y are 0 and not window_rect.x/y otherwise the
herustic will never trigger for windows on monitors whos x and y are not 0.

https://bugzilla.gnome.org/show_bug.cgi?id=738271
2014-10-12 00:35:47 +02:00
Adel Gadllah
a116509301 meta-surface-actor-x11: Detatch the pixmap in window_decorated_notify
The window can change its decoration without changing its size.

https://bugzilla.gnome.org/show_bug.cgi?id=738146

Found by Jasper St. Pierre <jstpierre@mecheye.net>
2014-10-08 23:11:47 +02:00
Owen W. Taylor
272e1fb296 MetaBackgroundActor: queue a redraw when the background changes
When the MetaBackground changes, queue the actor for redraw.
2014-10-08 15:03:02 -04:00
Jasper St. Pierre
8e85015f91 default: Adjust the default background
Getting a bit tired of green...
2014-10-07 20:42:26 -07:00
Carlos Garnacho
28e59c5a8f compositor: Add MetaDnDActor
This actor is a subclass of MetaFeedbackActor that additionally
implements the "drag failed" animation, snapping back to the drag
origin position in a surface.
2014-10-06 19:39:43 -07:00
Carlos Garnacho
b588baf9f5 compositor: Add MetaFeedbackActor
This actor is a non-reactive container that autoembeds itself into
the feedback window group in the compositor. The API is meant to
help on creating things attached to pointer/touchpoints, with an
X/Y attachment offset, and following the position of certain events.
2014-10-06 19:39:43 -07:00
Carlos Garnacho
9a825d9bee compositor: Add a "feedback" window group
Although not strictly a window group... This ClutterActor is
meant to stay always on top, and only show non-reactive actors
created by Mutter itself. Two possible usecases for this layer
are DnD surfaces, and touch spots.

We might also want to move cursors out of an overlay in MetaStage
into here at some point.
2014-10-06 19:39:43 -07:00
Owen W. Taylor
b735571688 MetaBackgroundImage: free the GdkPixbuf after creating a texture
The GdkPixbuf used to load a texture was never freed.
2014-09-29 21:32:48 -04:00
Owen W. Taylor
458953268b MetaBackground: fix getting stuck in a bad state after monitor changes
After the ::monitors-changed signal, set the dirty flag on each new
monitor information struct so the per-monitor resources will be
recreated.
2014-09-12 14:59:20 -04:00
Owen W. Taylor
e27bbdc769 Fix colors for horizontal background gradients
COGL_PIXEL_FORMAT_RGB_888 is packed 3-bytes per pixel.
2014-09-12 11:00:55 -04:00
Owen W. Taylor
09b46029fa Fix multi-monitor backgrounds
The texture area was meant to be in monitor-relative coordinates, but that
was not consistently followed throughout the code - fix.

https://bugzilla.gnome.org/show_bug.cgi?id=736568
2014-09-12 11:00:55 -04:00
Florian Müllner
8d53ae894b window-actor: Skip frame-sync when the corresponding window is gone
https://bugzilla.gnome.org/show_bug.cgi?id=735927
2014-09-11 16:50:23 +01:00
Florian Müllner
d50f8afa9e window-actor: Consider needs_destroy in is_destroyed()
According to the documentation, the method returns "whether the X window
that the actor was displaying has been destroyed" - that is very much
true when we delay the actual actor destruction for a destroy animation,
so update the method accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=735927
2014-09-11 16:50:23 +01:00
Florian Müllner
98fa343588 window-actor: Keep in compositor's window list until destroyed
When a window is destroyed, the corresponding actor may still be
kept around for the destroy effect. But as the actor is removed
from the compositor's stack list immediately, the compositor will
always stack it above "valid" window actors - this is not what we
want, so only update the compositor's list when the actor is
actually destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=735927
2014-09-11 16:50:23 +01:00
Florian Müllner
9be3e56b70 background: Fix monitor validation in get_texture()
Monitor indexes should be in the range [0, n], not [-1, 0] :-)
2014-09-06 18:22:56 +02:00
Jasper St. Pierre
7e0822c5b1 background-actor: Add missing paren 2014-09-05 13:51:21 -07:00
Jasper St. Pierre
3ea6424b8f background: Fix meta_background_new
This is used by the default plugin.
2014-09-03 19:55:15 -07:00
Jasper St. Pierre
883c4a7b0f background-actor: Add a simple paint volume
Not having a paint volume causes every single paint to turn into
full-stage redraw, since otherwise culling won't properly work.

Since we don't paint outside of our allocation, just use the simple
default implementation, but also return TRUE inside it.
2014-09-03 11:08:48 -07:00
Jasper St. Pierre
d4317ba1e4 background: Fix build
These warnings weren't properly working on Owen's machine, so they went
unchecked.
2014-09-03 11:03:17 -07:00
Owen W. Taylor
9d69b2a963 MetaBackground: add properties to set vignette settings
Make the vignette options properties so they can be animated;
modify the function-call API for meta_background_actor_set_vignette()
to correspond more closely to the 3 properties.

https://bugzilla.gnome.org/show_bug.cgi?id=735637
2014-09-03 13:43:40 -04:00
Owen W. Taylor
ef3b000050 MetaBackgroundActor: match total dimming if GLSL is not present
Without GLSL, we didn't apply the vignetting, which not only made the
background uniform in color, it made it much lighter. Adjust for this
and make the average brightness with the vignette effect the same
with or without GLSL.

https://bugzilla.gnome.org/show_bug.cgi?id=735637
2014-09-03 13:43:40 -04:00
Owen W. Taylor
a4a688ed83 Rewrite background code
The old requirement that multiple MetaBackgroundActor objects be
layered on top of each to produce blended backgrounds resulted in
extremely inefficient drawing since the entire framebuffer had
to be read and written multiple times.

 * Replace the MetaBackground ClutterContent with a plain GObject
   that serves to hold the background parameters and prerender
   textures to be used to draw the background. It handles
   colors, gradients, and blended images, but does not handle
   vignetting

 * Add vignetting to MetaBackgroundActor directly.

 * Add MetaBackgroundImage and MetaBackgroundImageCache to allow
   multiple MetaBackground objects to share the same images

By removing the usage of ClutterContent, the following optimizations
were easy to add:

 Blending is turned off when the actor is fully opaque
 Nearest-neighbour filtering is used when drawing 1:1

The GLSL vignette code is slightly improved to use a vertex shader
snippet for computing the texture coordinate => position in actor
mapping.

https://bugzilla.gnome.org/show_bug.cgi?id=735637
2014-09-03 13:43:40 -04:00
Owen W. Taylor
17dc5c57dd Use meta_actor_painting_untransformed() for MetaShapedTexture
The old check for using NEAREST by checking clutter_actor_is_in_clone_paint()
and meta_actor_is_untransformed (actor) doesn't work properly since
clutter_actor_is_in_clone_paint() does not look at ancestors of the
actor; it only applies to a direct clone of the actor. Using
meta_actor_painting_untransformed() allows us to check exactly what we
care about rather than using tricky approximations.

https://bugzilla.gnome.org/show_bug.cgi?id=735632
2014-09-03 13:43:40 -04:00
Owen W. Taylor
ef5f939db8 Factor out meta_actor_painting_untransformed()
The painting_untransformed() function in MetaWindowGroup is useful
elsewhere, in particular if we want to check whether we can avoid
bilinear filtering when painting a texture 1:1.

https://bugzilla.gnome.org/show_bug.cgi?id=735632
2014-09-03 13:43:40 -04:00
Jasper St. Pierre
2f9840a51c compositor: Conditionalize some more Wayland support 2014-08-27 12:56:39 -04:00
Jasper St. Pierre
09aefdba43 compositor: Conditionalize more Wayland support 2014-08-27 12:41:26 -04:00
Jasper St. Pierre
b091cbf361 shaped-texture: Don't set a small minimum size
The shaped-texture is effectively fixed size. It doesn't make sense to
have less allocation than requested.
2014-08-27 10:00:19 -04:00
Jasper St. Pierre
a6fcda69ac shaped-texture: Remove the use of MetaWindowActor internals
I want to make this class an independent helper.
2014-08-27 10:00:19 -04:00
Adel Gadllah
3a8bad1e6f meta-surface-actor: Fix is_argb32 for unredirected windows
meta_surface_actor_is_argb32 assumes that lack of stex means that a window is
ARGB32. When we unredirect a window we detach the texture so we end up without
a texture. Given that should_unredirect returns FALSE when a window is argb32,
we know that this window is indeed not ARGB32.

Returing TRUE in that case causes us to flip between redirected and
unredirected on every paint.

So fix that by returning FALSE in that case.
2014-08-26 18:59:02 +02:00
Jasper St. Pierre
6526118d9f shaped-texture: Fix a typo in a comment 2014-08-25 10:52:07 -04:00
Jasper St. Pierre
c15b3b4a09 shaped-texture: Fix the logic when the blended region is empty
When the blended region was empty, meaning we didn't have to paint
anything blended -- the case for an app update -- was drawing the
entire window blended, because of a think-o in the complex and
complicated logic.

Fix this so that we don't draw anything for the blended region when
empty.
2014-08-25 09:30:15 -04:00
Jasper St. Pierre
01a47c7d6d shaped-texture: If we have too many rectangles, don't paint the opaque
region first

If we're going to render the entire texture blended, then don't bother
painting the unblended stuff, since we're just going to draw on top
anyway.
2014-08-24 12:38:29 -04:00
Rico Tzschichholz
ecc254c659 surface-actor-x11: Fix "incompatible pointer type" error
Caused by e73c46ce03
2014-08-22 07:38:08 +02:00
Jasper St. Pierre
9cb1c95e49 surface-actor: Call process_damage even when the actor is invisible
Otherwise, surface-actor-x11 won't be marked as having received damage,
which is vital to updating the actual surface.
2014-08-21 18:30:56 -04:00
Jasper St. Pierre
e73c46ce03 surface-actor-x11: Use the existing check for "visibility"
Instead of doing our own thing here.
2014-08-21 18:30:35 -04:00
Jasper St. Pierre
952e9c52bc surface-actor-x11: Merge a simple function inline
This is a one-liner, only used in one place.
2014-08-21 18:30:17 -04:00
Jasper St. Pierre
dc0437a5b5 surface-actor-wayland: Pass in a CoglTexture, as well
This makes it so that MetaSurfaceActorWayland is effectively just a
wrapper actor around MetaShapedTexture with some extra scaling. I think
the MetaSurfaceActor subclassing was a bad idea -- we really should have
these abstractions in much higher levels in the stack than the
compositor.
2014-08-21 16:34:29 -04:00
Jasper St. Pierre
55331a0678 surface-actor-wayland: Don't store the buffer
We don't need to anymore -- we're purely texture based.
2014-08-21 16:24:30 -04:00
Jasper St. Pierre
f5580f61f9 wayland: Update the CoglTexture in the MetaWaylandSurface
It doesn't make sense to update it in the surface actor. It's also
theoretically wrong to update the buffer's texture on surface commit,
too, because it's buffer state, not surface state, but I don't think
there's any place we use a wl_buffer without a wl_surface.
2014-08-21 16:22:53 -04:00
Jasper St. Pierre
0e758a9e65 display: Establish a separate state variable for routing events
We've long used a switch statement on the grab operation to determine
where events should go. The issue with MetaGrabOp is that it's a mixture
of a few different things, including event routing, state management,
and the behavior to choose during operations.

This leads to poorly defined event routing and hard-to-follow logic,
since it's sometimes unclear what should point where, and our utility
methods for determining grab operations apart can be poorly named.

To fix this, establish the concept of a "event route", which describes
where events should be routed to.
2014-08-15 16:08:49 -04:00
Jasper St. Pierre
5f0fab2156 Conditionalize Wayland support again 2014-08-13 20:28:22 -04:00
Jasper St. Pierre
467465c99c backend: Create the stage in the backend, rather than the compositor
This allows creating the stage much earlier than it otherwise would have
been. Our initialization sequence has always been a bit haphazard, with
first the MetaBackend created, then the MetaDisplay, and inside of that,
the MetaScreen and MetaCompositor.

Refactor this out so that the MetaBackend creates the Clutter
stage. Besides the clarity of early initialization, we now have much
easier access to the stage, allowing us to use it for things such as
key focus and beyond.
2014-08-13 20:08:46 -04:00
Jasper St. Pierre
e935b52e51 display: Move composite version checks here 2014-08-13 19:32:39 -04:00
Jasper St. Pierre
e320b06aaa texture-tower: Fix error case in meta-texture-tower
If we for some reason have an error trying to allocate the framebuffer,
we'll still mark the tower as revalidated. Move the validation to the
end of the actual revalidation code to solve this.
2014-08-08 17:29:26 -04:00
Jasper St. Pierre
b284126d3b background: Don't bother attaching a paint node if the region is empty 2014-08-07 14:59:59 -04:00
Jasper St. Pierre
6858cb261f background-actor: Don't bother clipping to the content box
We already clip to the content box when we go to paint the content.
2014-08-07 14:58:18 -04:00
Jasper St. Pierre
2d6954186e background: Don't render with blending when we don't need to
If we have an opaque background image, then we shouldn't need to blend
against anything for it to work. Turn off blending in this case.
2014-08-07 14:01:14 -04:00
Jasper St. Pierre
d72bf0cd5d compositor: Don't use cogl_texture_new_with_data in the obvious cases
It's a deprecated API that can surprise us. Namely, when the internal
format passed is COGL_PIXEL_FORMAT_ANY, it will *always* allocate an
RGBA8888 pixel format texture, even if we only passed it a RGB format
or even an A8 format.

cogl_texture_2d_new_with_data is the newer, better API and doesn't have
these warts.
2014-08-07 14:01:14 -04:00
Jasper St. Pierre
584460deec background: Merge the code for creating the color texture into here
It's unused anywhere else.
2014-08-07 13:49:16 -04:00
Jasper St. Pierre
e3d5969282 background: Don't bother supporting alpha channels for gradients 2014-08-07 13:39:21 -04:00
Owen W. Taylor
249468bbea MetaTextureTower: actually mark revalidated levels as valid
We were never actually clearing the invalid area on the smaller levels
of the texture tower, so we recomputed those levels every time.

https://bugzilla.gnome.org/show_bug.cgi?id=734400
2014-08-07 15:56:28 +02:00
Rui Matos
7d54631ebf backends: Make MetaBackend available to introspection
This moves meta-backend.h under meta/ and, for now, just exposes to
introspection the methods that we actually need in gnome-shell.

https://bugzilla.gnome.org/show_bug.cgi?id=734301
2014-08-07 11:31:59 +02:00
Jasper St. Pierre
c2fe6a18ad shadow-factory: Comment fixes 2014-08-02 18:55:44 -04:00
Jasper St. Pierre
f9a77aec3f shadow-factory: Fix style 2014-07-31 17:49:13 +02:00
Jasper St. Pierre
bee6d2b240 shadow-factory: Untabify 2014-07-31 17:49:13 +02:00
Jasper St. Pierre
9a6a189e36 window-actor: Rebuild the shape and mask when the surface updates
Connecting to size-changed is wrong -- size-changed tells us when
we *told* the X server or resize the window. For X11, we're sort of
guaranteed that the surface will be updated at some point before the
next frame, but for Xwayland, we can't be sure that the new surface is
attached at this point.

This fixes weird artifacts when resizing apps like xclock.
2014-07-31 17:49:13 +02:00
Jasper St. Pierre
505eabb78c surface-actor: Remove unused APIs 2014-07-31 17:49:13 +02:00
Giovanni Campagna
b0ba325f0e MetaShapedTexture: fix critical warnings with fully obscured windows
If a window is fully obscured, it could have a negative paint volume
width/height. Normalize that to 0x0.
2014-07-31 16:21:32 +02:00
Jasper St. Pierre
6fbd21001b window-actor: Base the paint volume on our children, not our shape
This was wrong for subsurfaces that extend beyond the parent's shape,
since the paint volume would be wrong in this case. Instead of using the
shape region which can be out of date and wrong, just use the union of
our children's volumes, which is a lot easier to manage.
2014-07-30 17:15:00 +02:00
Jasper St. Pierre
626e4965b1 shaped-texture: Remove silly ClutterPaintVolume code with slightly less silly ClutterActorBox code 2014-07-30 17:09:23 +02:00
Jasper St. Pierre
6954d23444 window-actor: Don't connect to allocation-changed
This can cause allocation loops. Connect to size-changed to update the
shape instead.
2014-07-28 11:32:52 +02:00
Jasper St. Pierre
25f8eaf1ac shaped-texture: Clean up slightly 2014-07-28 11:23:36 +02:00
Cosimo Cecchi
cd84317346 compositor: add support for unminimize compositor effects
https://bugzilla.gnome.org/show_bug.cgi?id=733789
2014-07-26 17:26:40 +02:00
Carlos Garnacho
70aee2d95e display: cancel wayland client touches when the compositor is grabbed
When a compositor grab begins, clients will stop receiving events, so any
ongoing sequence at that time must be cancelled.

https://bugzilla.gnome.org/show_bug.cgi?id=733631
2014-07-24 18:07:30 +02:00
Adel Gadllah
37652ca2cf background: Do not assume GLSL is available
Some hardware does not support it causing crashes in cogl during paint.

https://bugzilla.gnome.org/show_bug.cgi?id=733623
2014-07-24 16:51:53 +02:00
Rui Matos
f55737ec06 compositor: Sync X drawing only once per frame
We only need to call XSync() once per frame to synchronize X with GL
drawing.

https://bugzilla.gnome.org/show_bug.cgi?id=728464
2014-07-23 13:59:18 -04:00
Adel Gadllah
6ee5a1437c x11: Move event filter to backend connection 2014-07-19 18:51:26 +02:00
Owen W. Taylor
182a267f69 Connect to ClutterStage::after-paint with connect_after()
Use connect_after() to accomodate code in GNOME Shell that,
when benchmarking drawing performance, connects to ::after-paint
and calls glFinish(). The timing information from that will be
more accurate if we hold off until that completes before we signal
apps to begin drawing the next frame. If there are no other
connections to ::after-paint, connect() vs. connect_after() doesn't
matter.

https://bugzilla.gnome.org/show_bug.cgi?id=732350
2014-07-16 13:38:15 -04:00