Commit Graph

7 Commits

Author SHA1 Message Date
Cosimo Cecchi
acba0e47d8 screenshot: support non-absolute paths when saving screenshots
If a non-absolute path is passed to the screenshot methods, treat it as
a basename for the output image, and automatically try to save it in
$XDG_PICTURES_DIR, falling back to $HOME if it doesn't exist.

https://bugzilla.gnome.org/show_bug.cgi?id=688004
2013-01-03 12:56:45 +01:00
Neil Roberts
7f8bfcc939 Remove shell-screen-grabber
The screen grabber was a workaround for an extremely slow path in Mesa
when reading back pixel data from the frame buffer. It was using pixel
buffer objects by directly calling into GL to hit a fast blit path in
Intel's driver. This should no longer be necessary with the latest
Mesa because the normal read pixels path now has a fast path to just
memcpy the data. Using PBOs in that case just adds an extra
indirection because the data is read into an intermediate buffer and
then copied back out again.

We want to be able to remove the dependency on linking against libGL
directly from Gnome Shell because that will not work if Cogl is
actually using GLES. Also libGL includes GLX which means gnome-shell
ends up with a hard dependency on Xlib which hinders the goal of
getting Gnome Shell to be a Wayland compositor.

https://bugs.freedesktop.org/show_bug.cgi?id=46631

https://bugzilla.gnome.org/show_bug.cgi?id=685915
2012-11-12 19:07:57 +01:00
Giovanni Campagna
55a4517cd1 Fix documentation warnings
gobject-introspection now emits many more warnings for malformed
comments, and they fail the build.

https://bugzilla.gnome.org/show_bug.cgi?id=673656
2012-04-09 19:57:51 +02:00
Jasper St. Pierre
2b87bb015c screenshot: Ensure that ShellScreenshot stays alive until the callback
We've been dangling on the edge of unsafety, unnoticed, for a little while
about the reference count safety of ShellScreenshot. GJS owns the entire
reference count, so as soon as it goes out of scope it could die, causing
GJS to try and fetch the corresponding wrapper object for a stale pointer.
We haven't seen any crashes because of luck -- SpiderMonkey tries to group
together deallocations to limit GC pauses, and there isn't really a lot
of GC pressure in the duration that a screenshot happens, so we tend to
be mostly stable. But in the case that you create a lot of objects while
a screenshot is going on, by hammering the "Print Screen" button, for
example, you can destroy the GObject before the callback finishes.

https://bugzilla.gnome.org/show_bug.cgi?id=672775
2012-03-26 12:54:07 -03:00
Jasper St. Pierre
07e10fa03e screenshot: Remove harmful empty finalizer
We really should be chaining up in the finalizer, but instead of leaving
an empty finalize, remove it entirely.

https://bugzilla.gnome.org/show_bug.cgi?id=672775
2012-03-26 12:54:07 -03:00
Cosimo Cecchi
c20503028a screenshot: add missing shell_screenshot_new()
And fix its declaration.
2012-02-14 15:57:34 -05:00
Adel Gadllah
4516e4cc3b screenshot: Split into separate file / class
Split the screenshot functionality from ShellGlobal into its own class.

https://bugzilla.gnome.org/show_bug.cgi?id=670086
2012-02-14 21:10:08 +01:00