Commit Graph

22 Commits (2343a90aa51708396aff2f5fef46bd707921fb1b)

Author SHA1 Message Date
Fredrik Höglund 3a47b1c1c0 Add XRenderUtils::findPictFormat() and findPictFormatInfo()
These methods look up the render pictformat that correspond to an
X visual, and the format description respectively.
2014-09-01 17:45:58 +02:00
Martin Gräßlin dcfc5582ec [kwin] Generate export header for kwinxrenderutils 2014-03-26 14:02:16 +01:00
Martin Gräßlin 6c1bad551b [kwin] Remove dependency on kwinglobals in kwinxrenderutils
XRenderUtils used connection() and rootWindow() provided by kwinglobals.
Those are now kept as static variables in the implementation set through
an init() method from Workspace prior to the first possible usage of any
functionality provided by XRenderUtils.

In order to make the xcb_connection_t* and the root window completely
internal the inline methods which used those are moved to the
implementation.
2014-03-26 14:01:08 +01:00
Martin Gräßlin 18a37d7ee8 [kwin] Fix includes of kde4support headers
* drop unused headers
* use QExplicitlySharedDataPointer instead of KSharedPointer
* drop KDE/ from includes
2014-03-18 14:34:36 +01:00
Aleix Pol c72e519d9c Remove KDE/ prefix in include directories
It's unneeded and deprecated since KF5.
2014-03-17 16:24:10 +01:00
Jacob Logan 0c4518cca9 added export header through cmake for kwineffects
REVIEW: 114233
2013-12-02 07:43:26 +01:00
Martin Gräßlin 969e6b85e7 Merge branch 'master' into frameworks-scratch
Conflicts:
	CMakeLists.txt
	kwin/client.cpp
	kwin/effects/highlightwindow/highlightwindow.cpp
	kwin/libkwineffects/kwingltexture.cpp
	kwin/libkwineffects/kwinxrenderutils.cpp
	kwin/scene_opengl.cpp
	kwin/workspace.cpp
	plasma/desktop/applets/kickoff/CMakeLists.txt
	plasma/desktop/applets/taskmanager/package/contents/code/tools.js
	plasma/desktop/applets/taskmanager/package/contents/ui/Task.qml
	plasma/desktop/applets/taskmanager/package/contents/ui/main.qml
	plasma/desktop/applets/taskmanager/package/metadata.desktop
	plasma/desktop/applets/taskmanager/plugin/textlabel.h
	plasma/desktop/applets/tasks/CMakeLists.txt
	plasma/desktop/applets/tasks/package/metadata.desktop
	plasma/desktop/applets/tasks/tasks.cpp
	plasma/desktop/toolboxes/plasma-toolbox-desktoptoolbox.desktop
	plasma/generic/applets/activitybar/activitybar.cpp
	plasma/generic/wallpapers/color/plasma-wallpaper-color.desktop
	plasma/generic/wallpapers/image/plasma-wallpaper-image.desktop
2013-09-24 11:28:38 +02:00
Thomas Lübking 1d778f4600 c++ cannot invoke other constructors
BUG: 324004
FIXED-IN: 4.11.1
BUG: 112274
2013-08-25 17:05:37 +02:00
Martin Gräßlin 388944314a Drop QPixmap ctor of XRenderPicture
Was a todo to remove it as it's just using a toImage. Removing this
ctor should make it for the user more obvious that put image is used.
2013-08-13 09:57:50 +02:00
Thomas Lübking e9e73f1134 add XRenderPicture(QImage) constructor
was implicitly present for QPixmap::toImage

REVIEW: 111878
2013-08-05 20:43:28 +02:00
Martin Gräßlin b01f5684c5 Remove not needed includes from kwineffect header files
Only include what's actually needed in the headers. This causes of course
some additional needed includes in some implementation files.
2013-03-06 10:23:09 +01:00
Martin Gräßlin c6be37bc84 Effects no longer need xfixes and xrender from XLib 2013-03-06 10:14:15 +01:00
Martin Gräßlin f45ade7785 Port preMultiply of color to xcb_render
Method returns a xcb_render_color_t instead of an XRenderColor.

With this change kwinxrenderutils is XLib free!
2013-02-14 14:20:27 +01:00
Martin Gräßlin 24c681448a Use XCB types in XRenderPicture API
Usage of xcb_pixmap_t and xcb_render_picture_t
2013-02-14 14:20:27 +01:00
Martin Gräßlin 7faede41c7 Use PutImage to convert QPixmap to XRenderPicture
In case of native graphics system nothing is changed for the moment - the
X11Pixmap-QPixmap bridge is continued to be used.

But in case of graphics system raster (or Qt5) this relationship is no
longer used. Instead the QPixmap is converted to a QImage and the image
bits are put into the created X11Pixmap for this XRenderPicture.

Note: Qt5 uses shm to transfer image data to drawables. This seems
unsuited in this case as it's only a one time transformation.

For Qt5 the native pixmap block needs to be removed and the ctor might be
changed to taking an QImage as argument to make more clear that there is
no mapping from QPixmap to X11Pixmap.
2013-02-14 14:20:27 +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 368de6842a Wrapper class to create an xcb_xfixes_region_t from a QRegion
Replaces the previously existing method to convert a QRegion which did
not take care of freeing the region again.

Usages are ported over.
2013-02-14 14:20:26 +01:00
Martin Gräßlin 9f85f7f597 Port non-composited Outline to XCB
Use xcb to create and manage the X11 backend of Outline. In addition the
used background pixmaps are rendered with XRender instead of using a
QPainter on a QPixmap. This is done because QPixmap is no longer bound to
an X Pixmap.

To create the XRender Picture the available functionality from
kwinxrenderutils is used. To be able to use it in KWin core the compile
option to build without XRender is removed for kwinxrenderutils, but
still supported for effects.

Obviously the port to XCB is not complete as xremderutils itself is still
on XLib.

REVIEW: 108642
2013-02-04 08:55:21 +01:00
Martin Gräßlin 533d57da60 Mark most ctors as explicit as reported by Krazy2 checker 2013-01-02 18:35:46 +01:00
Thomas Lübking 5e2414544f add offscreen render support to xrender
REVIEW: 104151
cherry-picked from b9534b4ca82973c2e99451b2e151241fd1b6e7cb
2012-03-21 00:35:31 +01:00
Martin Gräßlin 57d11c134a Move kwineffects library into own directory
Second part of cleaning up the lib directory: the effects library
now lives in libkwineffects/ directory.

For existing effects nothing changes as the install path is unchanged.
The change obsoletes the lib/ directory.

As glplatform.h has not yet been exported I dared to export it and
adjust the places where it is used.
CCMAIL: kwin@kde.org
2011-02-19 10:01:31 +01:00