Commit Graph

73 Commits (28d7b3c563e3e153ad41a8755503a605921c05ad)

Author SHA1 Message Date
Martin Gräßlin 466bef3a6d Adding a DesktopThumbnailItem declarative item
Similar to WindowThumbnailItem for rendering a desktop thumbnail.
Uses the new paintDesktop hook.

FEATURE: 296067
FIXED-IN: 4.11.0
REVIEW: 104441
2013-04-24 11:45:47 +02:00
Martin Gräßlin 1bb5a81292 Port SceneXRender to XCB
SceneXRender no longer uses XRender from XLib, but only XCB.

REVIEW: 109190
2013-03-13 08:19:14 +01:00
Martin Gräßlin 4a69ffb5c0 Do not use QPixmap::x11PictureHandle() to render shadow elements
The QPixmap's are wrapped using XRenderPicture.
2013-03-13 08:12:40 +01:00
Martin Gräßlin ce930dfc8a Use xRenderBlendPicture as alpha mask in SceneXrender
Less duplicated functionality.
2013-03-13 08:12:40 +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
Martin Gräßlin a1ac6df20e Move XRender based rendering of unstyled EffectFrame into scene_xrender
This follows how it is done for OpenGL where the renderRoundBox() got
dropped some time ago.

New implementation implements the box with round corners using xrender
directly instead of using a QPainter on a QPixmap.
2013-02-14 14:20:26 +01:00
Martin Gräßlin 533d57da60 Mark most ctors as explicit as reported by Krazy2 checker 2013-01-02 18:35:46 +01:00
Fredrik Höglund e578676f42 kwin: Rename flushBuffer() to present()
This function doesn't flush any buffered commands, it presents or posts
the color buffer to the surface to which the GL context is bound.
2012-10-29 21:31:17 +01:00
Martin Gräßlin 6152cc4fa5 Split out the windowing system related part of SceneOpenGL
The handling for creating and managing the OpenGL context is
split out of the SceneOpenGL into the abstract OpenGLBackend
and it's two subclasses GlxBackend and EglOnXBackend.

The backends take care of creating the OpenGL context on the
windowing system, e.g. on glx an OpenGL context on the overlay
window is created and in the egl case an EGL context is created.
This means that the SceneOpenGL itself does not have to care
about the specific underlying infrastructure.

Furthermore the backend provides the Textures for the specific
texture from pixmap operations. For that in each of the backend
files an additional subclass of the TexturePrivate is defined.
These subclasses hold the EglImage and GLXPixmap respectively.

The backend is able to create such a private texture and for
that the ctor of the Texture is changed to take the backend as
a parameter and the Scene provides a factory method for
creating Textures. To make this work inside Window the Textures
are now hold as pointers which seems a better choice anyway as
to the member functions pointers are passed.
2012-09-16 21:28:05 +02:00
Thomas Lübking fc665106c9 Swap vsync order, trade in 1frame lag
REVIEW: 103058
2012-05-17 11:41:26 +02:00
Thomas Lübking 88aeec920e re-add SceneXRender::paintGenericScreen implementation to cache screen_paint data 2012-03-21 00:37:10 +01:00
Thomas Lübking 1070bf895b split decorationRect / visibleRect usage
REVIEW: 104215

cherry-picked from 0f3380f3b10e57416f81a1288dc10b8dfe11d87e
Conflicts:

	kwin/geometry.cpp
	kwin/scene.cpp
2012-03-21 00:36:50 +01:00
Martin Gräßlin 711fd0b876 Drop include for config-workspace.h
None of the definitions is used anywhere in kwin.
REVIEW: 104081
2012-02-26 17:23:19 +01:00
Philipp Knechtges 9f9bde77ad kwin: removing SceneXrender::paintTransformedScreen
It is an unused function which becomes more and more obsolete with a
better support of transformed windows in paintSimpleScreen.
2012-02-09 14:52:46 +01:00
Thomas Lübking d845b60c6c change geometry w/o compositor restart
This possibly fails on some (older?) ati chip/driver combos
-> Waiting for bugreports

REVIEW: 103246
2012-01-24 22:27:15 +01:00
Thomas Lübking 634a504ce1 straighten xrender shadow implementation
did not publish function & enum in the baseclass, but inlined the accessor

REVIEW: 103232
(cherry picked from commit ecfa39ac3ca1c9823a6b320ff0f7a60ab32f0418)
2011-11-27 15:03:41 +01:00
Thomas Lübking 734052a784 implement and fix scaled XRender shadows
(cherry picked from commit 5fa1a06fd8fdd3081a48ba921b2e670a60a49695)
2011-08-02 23:11:02 +02:00
Arthur Arlt 859dacb8b5 Make Scene::windowClosed() a Q_SLOT
This commit just makes the declaration of windowClosed() in Class Scene be a Q_SLOT.
The inheriting classes SceneOpenGL and SceneXRender are updated as well.
2011-07-05 11:46:13 +02:00
Arthur Arlt 14af45cc04 Make Q slots public in class Scene
This commit just makes the slots public that are used in Scene class and its inheriting subclasses.
2011-07-05 11:34:12 +02:00
Arthur Arlt b63c9c1af8 Make mothod windowGeometryShapeChanged() a slot
The method windowGeometryShapeChanged() from the class Scene is now a slot. It is now connected to the signal geometryShapeChanged() which is sent from Toplevel instances Client and Unmanaged.
All direct method calls were deleted.
2011-07-05 11:34:12 +02:00
Arthur Arlt 59a8aac752 Make windowOpacityChanged() a slot
The method windowOpacityChanged is now a protected slot in class Scene. The implementations in the subclasses SceneOpenGL and SceneXRender are the same. The slots are connected to the singal opacityChanged() from Toplevel. The connection is done in the method windowAdded() in both SceneOpenGL and SceneXRender.
2011-07-05 11:34:12 +02:00
Arthur Arlt d88cb00b0b Make class Scene inherit from QObject
The class Scene now inherits from QObject and has the Q_OBJECT macro. The inheriting classes SceneOpenGL and SceneXRender are provided with the Q_OBJECT macro. Now it is possible to use signals and slots and replace direct method calls.
2011-07-05 11:34:12 +02:00
Martin Gräßlin 08b2aebd30 Merge branch 'KDE/4.7'
Conflicts:
	kwin/libkwineffects/kwinglutils.cpp
	kwin/libkwineffects/kwinglutils.h
2011-07-03 09:30:38 +02:00
Martin Gräßlin b837a3fca1 Render Shadow with only one GL texture
Copies the shadow parts into one image and creates a GLTexture
from the image, so that we can render the complete shadow with
just one texture and one painting pass.

Should remove most of the overhead involved when rendering the new Shadows.

As a side effect this should fix missing shadows with non-NPOT GPUs and
a rendering glitch reported with NVIDIA.

REVIEW: 101742
2011-07-03 09:24:28 +02:00
Martin Gräßlin 6cfdbfe1dc Remove compositing self-check
Removes the last bits of the self-check at compositing startup.
It seems like they were only added to XRender because they were
in OpenGL and there they are not available for quite some time.

Also removes the now obsolete disable functionality checks from UI.

REVIEW: 101756
2011-06-26 09:19:22 +02:00
Jacopo De Simoi e688058235 kwin: Implement shadows in XRender compositor
There are still some glitches to be fixed, but
it works well for most use-cases.
2011-04-28 11:39:48 -04:00
Martin Gräßlin 0a7e48f7aa KWin uses kdelibs coding style. 2011-01-31 20:07:03 +01:00
Martin Gräßlin eabad32cfb Add cross fade support for text and icon to EffectFrame.
This allows an effect to fade between old and new text/icon. As an example it's added to CoverSwitch.
Currently only supported in OpenGL. XRender might be added, but I'm missing an idea for an effect to add it.
Most effects using EffectFrame require OpenGL anyway.

svn path=/trunk/KDE/kdebase/workspace/; revision=1160252
2010-08-07 14:08:34 +00:00
Martin Gräßlin ef79d4c443 Use the normal Plasma selection to highlight the selected window in boxswitch.
So it is more consistent (in KDE newspeak "elegant") with other selections and as a plus we get rid of all the custom rendering code in boxswitch.

svn path=/trunk/KDE/kdebase/workspace/; revision=1155051
2010-07-26 20:00:04 +00:00
Martin Gräßlin fa832b7aa7 Cache the icon texture/picture in EffectFrame and use texture from pixmap to load the data in OpenGL mode. Yeah for less pixmap to image to gltexture conversations.
Some effects (boxswitch and flipswitch) still need to be changed to not set the icon in each frame.

svn path=/trunk/KDE/kdebase/workspace/; revision=1152367
2010-07-20 21:11:03 +00:00
Martin Gräßlin e2eebb6503 Refactoring of EffectFrame: EffectFrame becomes an interface just like EffectsHandler and EffectWindow and a concrete EffectFrameImpl in core.
Rendering of the EffectFrame is moved into the scene as Scene::EffectFrame with a concrete implementation in SceneXrender and SceneOpenGL.
A factory method for an EffectFrame is added to the EffectsHandler, which is used by the effects.
Next step: pass the EffectFrame through all effects, so that effects can transform, blur, invert whatever it.

svn path=/trunk/KDE/kdebase/workspace/; revision=1151271
2010-07-18 16:32:37 +00:00
Fredrik Höglund e92aab0518 Implement initial support for ARGB window decorations.
Based on earlier work done by Lubos Lunak and ideas by Lucas Murray.

svn path=/trunk/KDE/kdebase/workspace/; revision=957680
2009-04-22 17:29:56 +00:00
Luboš Luňák 7249ca2cfb Do self-check immediatelly during compositing setup only when it's not KWin startup
at the same time (in other words, only when activating compositing using the kcm).
Currently selfcheck causes bad flicker (due to X mapping the overlay window
for too long?) which looks bad during KDE startup. With this patch, KDE startup
is without any flicker.


svn path=/trunk/KDE/kdebase/workspace/; revision=923842
2009-02-09 14:51:11 +00:00
Luboš Luňák 6796c1225f Self-check also for XRender.
svn path=/trunk/KDE/kdebase/workspace/; revision=862312
2008-09-18 15:27:13 +00:00
Luboš Luňák cff2b0e6cd Abstract paint clipping into PaintClipper helper class that allows
stacking of clipping regions.
(http://lists.kde.org/?l=kwin&m=120138051215450&w=2)
BUG: 156798


svn path=/trunk/KDE/kdebase/workspace/; revision=779045
2008-02-25 11:32:21 +00:00
Luboš Luňák bb433ac40e No longer include config*.h files in installed headers.
Also slightly redo the #define's for effects, now it's:
- #ifdef KWIN_HAVE_COMPOSITING to check whether there's any compositing support at all
- #ifdef KWIN_HAVE_OPENGL_COMPOSITING to check for OpenGL-based compositing
- #ifdef KWIN_HAVE_XRENDER_COMPOSITING the same for XRender
CCMAIL: kwin@kde.org


svn path=/trunk/KDE/kdebase/workspace/; revision=749628
2007-12-17 14:14:53 +00:00
Luboš Luňák 01bf6cbb4c License cleanup - add headers where missing, be explicit about GPL
being v2+ (right now it says just GPL, which according to GPL itself
means any GPL). Decoration clients will come later.
CCMAIL: kwin@kde.org


svn path=/trunk/KDE/kdebase/workspace/; revision=742302
2007-11-27 19:40:25 +00:00
Luboš Luňák e6069e9cf6 Arghl. Again a stupid bug caused by float having poor precision.
Reverting r700026 and changing floats to doubles again. I'd probably like
to change even the ones interfacing with OpenGL which I've left for now.


svn path=/trunk/KDE/kdebase/workspace/; revision=707987
2007-09-03 15:00:43 +00:00
Luboš Luňák d846a1e8a9 Use always float as the floating point type for compositing
(http://lists.kde.org/?l=kwin&m=118493073424327&w=2).


svn path=/trunk/KDE/kdebase/workspace/; revision=700026
2007-08-14 15:22:23 +00:00
Dirk Mueller e625a97905 include cleanups
svn path=/trunk/KDE/kdebase/workspace/; revision=680057
2007-06-25 11:03:18 +00:00
Laurent Montel f32b3e8d92 Remove not necessary "class classname;"
svn path=/trunk/KDE/kdebase/workspace/; revision=671233
2007-06-04 08:24:29 +00:00
Jeremy Paul Whiting 25032ec5da those of us on kubuntu need this include
svn path=/trunk/KDE/kdebase/workspace/; revision=670314
2007-06-01 01:35:23 +00:00
Luboš Luňák 1caa3f95ed Properly check for all needed extensions and handle gracefully absence.
svn path=/trunk/KDE/kdebase/workspace/; revision=669827
2007-05-30 14:22:09 +00:00
Thorsten Roeder 0666147473 some krazy fixes
svn path=/trunk/KDE/kdebase/workspace/; revision=664331
2007-05-13 17:47:20 +00:00
Harri Porten 1768b04b53 compile without Xfixes extension
svn path=/trunk/KDE/kdebase/workspace/; revision=661762
2007-05-06 14:38:28 +00:00
Luboš Luňák f52b8e48cd branches/work/kwin_composite becomes new trunk kwin.
svn path=/trunk/KDE/kdebase/workspace/; revision=659202
2007-04-29 17:35:43 +00:00
Luboš Luňák 2b7e1f4993 Remove kwin, kwin_composite will become new trunk kwin, missing merges
from trunk will be merged in.


svn path=/trunk/KDE/kdebase/workspace/; revision=659200
2007-04-29 17:34:49 +00:00
Rivo Laks 0353f3376e Make effects actual plugins, so it's possible to load them on runtime.
There's also a kwineffects library now, containing the effects API, which makes it possible to write
  third-party effects.
API isn't complete yet and for now just two effects have been converted but I'm working on it :-)

svn path=/branches/work/kwin_composite/; revision=652226
2007-04-10 13:02:08 +00:00
Luboš Luňák e3b865cd5f namespace KWinInternal -> KWin - shorter typing of names in gdb, yay
svn path=/branches/work/kwin_composite/; revision=650770
2007-04-05 12:07:35 +00:00
Luboš Luňák da02ba11ca Scene*::Window classes are now too complex to be value-based,
allocate them dynamically.


svn path=/branches/work/kwin_composite/; revision=645046
2007-03-21 15:52:42 +00:00