1
0
Fork 0
Commit graph

15 commits

Author SHA1 Message Date
Robert Bragg
a22859a64a shaped-texture: never slice shape mask texture
Since Cogl doesn't support multi-texturing with sliced textures and the
shape texture is combined with the texture-from-pixmap texture we need
to make sure we never construct a sliced mask texture. This patch simply
passes the COGL_TEXTURE_NO_SLICE flag to cogl_texture_from_data when
creating the shape mask texture.

https://bugzilla.gnome.org/show_bug.cgi?id=674731
2012-04-25 11:57:33 +01:00
Robert Bragg
d249cfd040 Pass CoglContext to cogl_texture_pixmap_x11_new()
The experimental Cogl api cogl_texture_pixmap_new() was recently changed
so it now expects an explicit CoglContext argument and it can also
return exceptions now via a GError. This patch updates mutters use of
the api accordingly.
2012-02-21 18:23:22 +00:00
Adel Gadllah
3cb912aee2 MetaShapedTexture: Implement get_paint_volume
Add a get_paint_volume implementation to MetaShapedTexture.
2012-02-21 18:09:25 +01:00
Jasper St. Pierre
7319b10d72 MetaShapedTexture: Remove visible_pixels_region
When we were shaping the window with a cairo region, there was an easy
optimization to restrict painting only to the pixels we were going to
actually draw. With rounded corners, the amount of work we have to do
figure out what pixels isn't worth the small savings of not drawing the
completely transparent parts of the corners, so remove this optimization,
and the supporting meta_shaped_texture_get_visible_pixels_region()

https://bugzilla.gnome.org/show_bug.cgi?id=657639
2012-02-03 19:58:21 -05:00
Jasper St. Pierre
1265efcf78 MetaShapedTexture: Add a new method to flatten the shaped texture into pixels
This will be used by the Shell to implement a screenshot_window method.

https://bugzilla.gnome.org/show_bug.cgi?id=660941
2012-02-03 19:57:38 -05:00
Jasper St. Pierre
3e0ef03fd9 MetaShapedTexture: Make public and directly derive from ClutterActor
ClutterTexture has many features that we simply don't use and don't make
sense for a subclass with custom drawing. Deriving directly from ClutterActor
simplifies our code by avoiding workarounds and makes things more robust.

Additionally, make it public. GNOME Shell was already assuming that any
MetaShapedTexture was also a ClutterTexture, and we need to replace these
bits with new API for GNOME Shell to use.

https://bugzilla.gnome.org/show_bug.cgi?id=660941
2012-02-03 15:35:41 -05:00
Jasper St. Pierre
f82966adb5 Various annotation fixes
https://bugzilla.gnome.org/show_bug.cgi?id=660854
2011-10-04 16:44:39 -04:00
Jasper St. Pierre
9520eaa970 MetaShapedTexture: Fix a crash caused by a silly typo 2011-09-13 20:15:22 -04:00
Jasper St. Pierre
49a3fd53b0 MetaShapedTexture: Allow for a "cairo overlay"
A cairo overlay gives us a path to overlay the mask texture data, allowing for
complex, anti-aliasing effects on the frame shape.

https://bugzilla.gnome.org/show_bug.cgi?id=628195
2011-08-26 12:24:22 -04:00
Jasper St. Pierre
f83568fc4e MetaShapedTexture: Use a proper stride, calculated by cairo
This will help us when painting directly on to the mask texture with
cairo, which is needed for rounded corner AA.

https://bugzilla.gnome.org/show_bug.cgi?id=628195
2011-08-24 09:38:23 -04:00
Jasper St. Pierre
65e1b416ef Port MetaShapedTexture/MetaWindowActor to use cairo regions instead of XRects
https://bugzilla.gnome.org/show_bug.cgi?id=644930
2011-08-09 17:14:50 -04:00
Emmanuele Bassi
f396a7aeb4 Do not use ClutterGLXTexturePixmap
MetaShapedTexture can be a ClutterX11TexturePixmap sub-class, given that
ClutterGLXTexturePixmap is just a shim compatibility layer since Clutter
1.4, and it's been deprecated.

https://bugzilla.gnome.org/show_bug.cgi?id=655064
2011-07-22 10:49:04 +01:00
Neil Roberts
fccd626604 Use a utility function to create GL_ARB_texture_rectangles
meta-texture-rectangle and meta-shaped-texture both create textures
with GL_TEXTURE_RECTANGLE_ARB as the target using direct GL
calls. This patch moves that code into a shared utility function in a
separate file instead. The function resolves the required GL symbols
dynamically instead of linking to them directly so that if Clutter
eventually stops linking to -lGL mutter will continue to build. The
function also splits the texture creation into a separate texture
creation and data upload stage so that it can use
cogl_texture_set_region to upload the data. That way it can avoid
clobbering the glPixelStore state and it can let Cogl do any necessary
format conversion. The code preserves the old value of the rectangle
texture binding instead of clobbering it because Cogl expects to be
able to cache this value to avoid redundant glBindTexture
calls. Finally, the function uses cogl_object_set_data to
automatically destroy the GL texture when the Cogl texture is
destroyed. This avoids having to have special code to destroy the cogl
texture.

https://bugzilla.gnome.org/show_bug.cgi?id=654569
2011-07-19 11:06:23 +01:00
Andreas Mueller
d3df33ecdb Fix errors building for gles-systems (clutter-eglx)
* GL_TEXTURE_RECTANGLE_ARB not avaliable
* clutter_glx_texture_pixmap_using_extension / CLUTTER_GLX_TEXTURE_PIXMAP not avaliable

Signed-off-by: Andreas Mueller <schnitzeltony@gmx.de>
2011-01-04 11:27:16 -05:00
Owen W. Taylor
1920f211b0 Remove Mutter namespace prefix
Move all objects and functions namespaced with Mutter into the Meta namespace
to get a single consistent namespace. Changes that aren't simply changing mutter
to meta:

 MutterWindow              => MetaWindowActor
 mutter_get_windows        => meta_get_window_actors
 mutter_plugin_get_windows => meta_plugin_get_window_actors

https://bugzilla.gnome.org/show_bug.cgi?id=628520
2010-10-23 15:48:29 -04:00
Renamed from src/compositor/mutter-shaped-texture.c (Browse further)