Commit graph

99 commits

Author SHA1 Message Date
Martin Gräßlin
b8c6831a1f Port Screenshot effect to XCB
This includes:
* getting cursor image through xcb_xfixes
* using xcb_image_get for reading screen content in xrender case
* using xcb_put_image to upload the generated screenshot into shared xpix

Overall this means that QPixmap as an X Pixmap wrapper is no longer used.
The conversion from xcb_image_t to QImage still needs some code for not
matching byte order. I'm a little bit unsure about adding the code as I
would not be able to test it.

REVIEW: 109076
2013-02-25 13:31:50 +01:00
Martin Gräßlin
f20ec15053 Port xRenderOffscreenTarget away from QPixmap
Instead of having a pointer to a QPixmap the offscreen target holds an
xcb_render_picture_t. To make this possible in SceneWindow the tempPixmap
is changed from a QPixmap* to a XRenderPicture*. QPixmap was only used
for convenience.

ScreenShot Effect as only user of the offscreen target is adjusted but
as it needs a QImage, still uses a QPixmap wrapper.
2013-02-14 14:20:27 +01:00
Marco Martin
9bddaea08b Merge branch 'KDE/4.10' 2013-02-07 17:59:07 +01:00
Script Kiddy
685e9368b1 SVN_SILENT made messages (.desktop file) 2013-02-07 13:30:14 +01:00
Martin Gräßlin
10c07080bb Notify effects when the screen gets locked
EffectsHandlerImpl starts to monitor DBus for the screen being locked and
provides this information to the Effect system by allowing them to ask
whether the screen is currently locked and by emitting a signal when the
screen gets locked/unlocked.

This information is needed to ensure that no private data is shown on the
screen. The following effects are adjusted:
* taskbar thumbnails
* thumbnail aside
* mouse mark
* screen shot

BUG: 255712
FIXED-IN: 4.11
REVIEW: 108670
2013-02-07 10:23:30 +01:00
Script Kiddy
dad894d830 SVN_SILENT made messages (.desktop file) 2013-02-06 08:18:00 +01:00
Script Kiddy
7d16cef10e SVN_SILENT made messages (.desktop file) 2013-02-05 21:32:15 +01:00
Script Kiddy
ca2cf4d697 SVN_SILENT made messages (.desktop file) 2013-01-31 12:00:36 +01:00
Script Kiddy
1416c8d62c SVN_SILENT made messages (.desktop file) 2013-01-30 16:27:26 +01:00
Script Kiddy
2ea65eb18e SVN_SILENT made messages (.desktop file) 2013-01-26 13:21:28 +01:00
Script Kiddy
7d821f3814 SVN_SILENT made messages (.desktop file) 2013-01-26 09:04:17 +01:00
Martin Gräßlin
b7f06b8708 Use window size for offscreen texture size in screenshot effect
Effect used the display size which caused windows being larger than
either width or height not to be captured correctly.

Now it uses the window size for the offscreen texture which also requires
to adjust the modelviewprojection matrix.

As an unrelated change the pointer to GLRenderTarget and GLTexture are
changed to a QScopedPointer and some variables which got moved around
are consted.

BUG: 312851
FIXED-IN: 4.11
REVIEW: 108258
2013-01-15 15:05:43 +01:00
Script Kiddy
c6d91ac7eb SVN_SILENT made messages (.desktop file) 2013-01-07 08:11:48 +01:00
Thomas Lübking
75e87a44ce finish / sync screenshot before calling ksnapshot
BUG: 312209
FIXED-IN: 4.10
REVIEW: 107981
2013-01-02 18:25:45 +01:00
Script Kiddy
12f341712c SVN_SILENT made messages (.desktop file) 2012-12-24 09:05:36 +01:00
Script Kiddy
d7316b9fcb SVN_SILENT made messages (.desktop file) 2012-12-23 08:01:50 +01:00
Script Kiddy
49a373b681 SVN_SILENT made messages (.desktop file) 2012-12-01 08:03:43 +01:00
Martin Gräßlin
6d2dfe06e7 Introduce dedicated OpenGL1 and OpenGL2 compositing types
The CompositingType enum turns into flags and two new values are
introduced: OpenGL1Compositing and OpenGL2Compositing.

Those new values are or-ed to OpenGLCompositing so that a simple check
for the flag OpenGLCompositing works in case of one of those two new
values. To make the generic check for OpenGL compositing easier a method
in EffectsHandler is introduced to just check for this.

The scenes now return either OpenGL1Compositing or OpenGL2Compositing
depending on which Scene implementation. None returns OpenGLCompositing.
2012-09-29 15:33:57 +02:00
Raphael Kubo da Costa
7beb3f2ce9 Merge branch 'KDE/4.9'
* KDE/4.9:
  Fix callback race in the session save and shutdown code.
  Update for 4.9.0 release
  SVN_SILENT made messages (.desktop file)
  SVN_SILENT made messages (.desktop file)
  Fix regression in QML shutdown menu. Ampersands should be removed from menu entries' text by default.
  Fix typos in a message that broke string freeze.
  Fix potential parallel build failure.

Conflicts:
	CMakeLists.txt
2012-07-25 14:56:17 -03:00
Script Kiddy
9db4ae2344 SVN_SILENT made messages (.desktop file) 2012-07-24 19:29:09 +02:00
Martin Gräßlin
a2b0d42916 Replace translation by QVector3D in Screen/Window PaintData 2012-07-19 18:25:03 +02:00
Script Kiddy
62211420c7 SVN_SILENT made messages (.desktop file) 2012-05-28 11:08:19 +02:00
Martin Gräßlin
f6a0c6907a Fix compilation of screenshot effect without XRender 2012-05-26 10:24:11 +02:00
Aleix Pol
73c142fe45 Extend the screenshot effect API.
Makes it possible to take a screenshot for a given window ID.

REVIEW: 104388
2012-04-12 13:13:49 +02:00
Martin Gräßlin
27643f5a9e Drop kephal dependency from KWin
Kephal has turned into not being more than a wrapper around
QDesktopWidget and does not even provide syntax sugar.

REVIEW: 104427
2012-04-01 08:11:57 +02:00
Martin Gräßlin
05198bc2b7 Ifdef XRender related code in Screenshot effect
For PA KWin is compiled without XRender but with Screenshot effect
causing the compile to fail.
2012-03-24 08:08:12 +01:00
Thomas Lübking
5bf62e5308 add xrender support to screenshot effect
REVIEW: 104152
cherry-picked from 30ee236d9d7a9c42d763fa4704156846cfa6af25
2012-03-21 00:36:29 +01:00
Martin Gräßlin
2007a7eab8 Use namespaced parameters in signals
Required to get scripting bindings working.
2012-03-12 21:37:40 +01:00
Script Kiddy
6750f8907e SVN_SILENT made messages (.desktop file) 2012-01-30 11:46:01 +01:00
Script Kiddy
dde9eadfe1 SVN_SILENT made messages (.desktop file) 2011-12-29 10:49:38 +01:00
Script Kiddy
8979af0a5f SVN_SILENT made messages (.desktop file) 2011-12-18 09:55:30 +01:00
Script Kiddy
8ed9b35755 SVN_SILENT made messages (.desktop file) 2011-12-13 15:55:20 +01:00
Thomas Lübking
0cbe297d84 sanitize closed screenshot windows, ignore deleted
CCBUG: 288271
REVIEW: 103350
2011-12-10 21:25:57 +01:00
Script Kiddy
e9ef4b8600 SVN_SILENT made messages (.desktop file) 2011-10-13 08:48:12 +02:00
Philipp Knechtges
ef9aeafe0d kwin: Optimizing Blur Part II
This patch adds an optional texture cache to the blur effect such that damaged windows in
front of the blurred region dont trigger a repaint of the whole blurred region which pretty
often results in a avalanche repaint of nearly the whole screen.

REVIEW: 101977
2011-09-18 02:01:31 +02:00
Script Kiddy
4cbbf921d4 SVN_SILENT made messages (.desktop file) 2011-09-09 09:21:44 +02:00
Script Kiddy
157f51ce85 SVN_SILENT made messages (.desktop file) 2011-09-08 09:04:13 +02:00
Martin Gräßlin
fe4329a252 Only call active effects in the effect chain
Each effect is able to declare itself as currently being active,
that is transforming windows or painting or screen or doing anything
during the current rendered frame.

This change eliminates the hottest path inside KWin identified by
callgrind.

REVIEW: 102449
2011-08-29 07:06:58 +02:00
Martin Gräßlin
29e91f9042 Support for fullscreen, screen and region screenshot
Just to have something which uses the blitFramebuffer functionality.
2011-08-20 10:58:43 +02:00
Script Kiddy
30de988de8 SVN_SILENT made messages (.desktop file) 2011-07-24 09:25:34 +02:00
Script Kiddy
2566d184c4 SVN_SILENT made messages (.desktop file) 2011-07-20 09:24:14 +02:00
Script Kiddy
1eb1c85289 SVN_SILENT made messages (.desktop file) 2011-07-13 09:17:45 +02:00
Script Kiddy
4eba738a3f SVN_SILENT made messages (.desktop file) 2011-07-12 10:36:56 +02:00
Script Kiddy
d414f57c8d SVN_SILENT made messages (.desktop file) 2011-07-07 10:20:05 +02:00
Script Kiddy
976f396fc7 SVN_SILENT made messages (.desktop file) 2011-07-06 10:41:48 +02:00
Martin Gräßlin
78dd6e6859 Fix rendering glitch in screenshot effect with Raster
We have to set the bit depth of the XPixmap to 32 in order to get
an alpha channel and we have to render the grabbed image using
composition mode Source in order to just copy all pixels to the
destination pixmap.

BUG: 276719
FIXED-IN: 4.7.0
2011-07-03 12:23:11 +02:00
Script Kiddy
538e9d1467 SVN_SILENT made messages (.desktop file) 2011-06-21 11:01:53 +02:00
Script Kiddy
3d0c81f121 SVN_SILENT made messages (.desktop file) 2011-05-17 10:49:34 +02:00
Martin Gräßlin
234ec644d2 KWin supports graphicssystem Raster
With raster a QPixmap is no longer a XPixmap which fails all code
which assumes that an QPixmap is an XPixmap. Depending on were in
the codebase we either convert such pixmaps to images (OpenGL) or
create a XPixmap and use QPixmap::fromX11Pixmap to get a "real"
pixmap.

It is possible that there are more code pathes were we would need
a XPixmap. Currently tested is basic functionality of no-compositing,
XRender compositing, OpenGl/GLX and OpenGL ES/EGL compositing.

For OpenGL compositing raster might result in performance improvements,
for XRender it is possible that there are regressions when using raster.
By default KWin uses whatever is the default of the system, so we just
no longer enforce native.

Of course it is a bad idea to use graphicssystem OpenGL. As that
is broken anyways in Qt, we do not check for it.

Many thanks to Philipp Knechtges for bringing up the issue, convincing
me that we need it and providing most of the patch.

REVIEW: 101132
CCMAIL: Philipp.Knechtges@rwth-aachen.de
2011-05-12 18:52:38 +02:00
Script Kiddy
9d7c88d288 SVN_SILENT made messages (.desktop file) 2011-05-11 09:17:09 +02:00