Commit Graph

10674 Commits (70f93c12a888aa0d19ea9220e69153f26a4b7063)

Author SHA1 Message Date
Martin Gräßlin 2657476db0 Safety checks in cube and coverswitch if shaders are not available
Do not try to load the shaders if using the OpenGL1 compositor - it
might crash the driver.

REVIEW: 110798
2013-06-04 17:04:27 +02:00
Martin Gräßlin aa92d2dbd9 No repaints for keepAtTarget and before started
Do not schedule repaints in AnimationEffect if there are no animations
going on. If an animation is waiting for starting or kept after ending
the visual appearance is no longer changed, so no repaint is needed.

REVIEW: 110795
2013-06-03 15:45:02 +02:00
Albert Astals Cid bbdbcdec23 Merge remote-tracking branch 'origin/KDE/4.10'
Conflicts:
	CMakeLists.txt
2013-05-30 21:04:08 +02:00
l10n daemon script fb6d08435d SVN_SILENT made messages (.desktop file) 2013-05-30 07:03:06 +00:00
l10n daemon script 020f6fd612 SVN_SILENT made messages (.desktop file) 2013-05-30 04:29:57 +00:00
Fredrik Höglund feb6fa3aea kwin: Remove makeDecorationArrays()
There is no longer any reason why the decorations cannot be rendered
with renderQuads().
2013-05-29 18:17:57 +02:00
Fredrik Höglund 5b445b1706 kwin: Set the texcoords in the decoration quads
This way we don't have to compute them in makeDecorationArrays().
2013-05-29 18:17:57 +02:00
Fredrik Höglund 49e78a3507 kwin: Optimize shadow quad selection
Loop over the window quad list once instead of eight times when
selecting the shadow quads.
2013-05-29 18:17:57 +02:00
Fredrik Höglund c8e3d670e7 kwin: Optimize decoration quad selection
Loop directly over the window quad list and check the type instead of
using select(WindowQuadDecoration) when separating the decoration quads.

This avoids the step of creating an intermediate list, and then looping
over that list to separate out the quads that belong to the four sides.
2013-05-29 18:17:57 +02:00
Fredrik Höglund 9c348c9a82 kwin: Refactor the decoration code a bit 2013-05-29 18:17:57 +02:00
Fredrik Höglund 1f6b791f11 kwin: Declare the attribute layout once in SceneOpenGL::Window
The same layout is used for all draw calls in
SceneOpenGL::Window::performPaint().
2013-05-29 18:17:46 +02:00
Fredrik Höglund d6fadfa91c kwin: Add an SSE2 vertex upload path
Use MOVNTDQ instructions to write vertex data into the buffer object.
2013-05-29 17:53:08 +02:00
Alexandr Akulich cb3f1b7776 Polish Plastik theme.
Fixed caption and left buttons positions.
Added enphasizing line under titleRow. (like in 4.9.x version).

REVIEW: 109992
BUG: 317220
FIXED-IN: 4.11
2013-05-29 07:34:13 +02:00
l10n daemon script 34a332742c SVN_SILENT made messages (.desktop file) 2013-05-29 02:52:52 +00:00
Allen Winter ecb9c1cf5a Add a hack for compiling xcb/xcb_icccm.h with C++.
xcb/xcb_iccm.h isn't C++ safe (some versions) because it has
a variable called "class" in function signatures. The hack
is to define "class" to something else before that header is
included, and then undef "class" immediately afterwards.

CCMAIL: mgraesslin@kde.org, fredrik@kde.org
2013-05-28 19:02:58 -04:00
Oliver Henshaw 47acf4ee9a Merge remote-tracking branch 'origin/KDE/4.10' into master
Conflicts:
	kwin/scripting/scripting.cpp
	powerdevil/daemon/actions/bundled/powerdevildimdisplayaction.desktop
	solid-actions-kcm/device-actions/solid-device-SerialInterface.desktop
2013-05-28 17:36:53 +01:00
Oliver Henshaw b61bca0f3d add qml import paths in correct order
addImportPath prepends the path to importPathList so we must add our
paths in reverse order.

Based on the fix for kdeclarative.cpp in kdelibs
400b9f2e9d10386bb175b6123fe0cdaafeaffe61

REVIEW: 110670
2013-05-28 17:23:19 +01:00
Oliver Henshaw 2d5ebd3b8d Replace foreach with java-style iterator
In preparation for reversing the loop.

REVIEW: 110670
2013-05-28 17:23:09 +01:00
Oliver Henshaw bf044bf509 Drop unneeded duplicate addImportPath
Let KDeclarative::setupBindings() add the import paths: it too takes
paths from KGlobal::dirs()->findDirs("module", "imports"); it adds paths
in the correct (reverse) order [1].

[1] See kdelibs 400b9f2e9d10386bb175b6123fe0cdaafeaffe61 for further
details.

REVIEW: 110670
2013-05-28 17:21:48 +01:00
Fredrik Höglund 9c1833920c kwin: Use the new map() interface in renderQuads()
Write the vertex data directly into the buffer object, instead of
allocating two temporary arrays, coyping the data into them, and
then copying the data from the arrays into the buffer object.

This also makes renderQuads() handle coordinates for rectangular
textures correctly.
2013-05-28 18:13:34 +02:00
Fredrik Höglund 7a00648195 kwin: Use the new map() interface in makeDecorationArrays()
Write the vertex data directly into the buffer object, instead of
allocating two temporary arrays, copying the data into them, and
then copying the data from arrays into the buffer object.
2013-05-28 18:13:34 +02:00
Fredrik Höglund de4b7e8db1 kwin: Add WindowQuadList::makeInterleavedArrays()
Unlike makeArrays() this function writes into a pre-allocated array,
and takes a matrix that's used to transform the texture coordinates.
This allows this function to handle coordinates for rectangular
textures correctly.
2013-05-28 18:13:06 +02:00
Fredrik Höglund a5a2561f69 kwin: Simplify WindowQuadList::makeArrays()
Note that unlike the previous commit, this doesn't fix texture coordinates
for rectangular textures. That case cannot be handled correctly without
knowing the dimensions of the texture.
2013-05-28 16:35:37 +02:00
Fredrik Höglund 6891c900b3 kwin: Simplify makeDecorationArrays()
This also fixes coordinate inversion for rectangular textures.
2013-05-28 16:35:37 +02:00
Fredrik Höglund d4aacd678e kwin: Add more accessors in WindowVertex
Reorder some of the methods and add new u() and v() accessors,
which are aliases of textureX() and textureY().
2013-05-28 16:35:37 +02:00
Fredrik Höglund 7a99b8c0ef kwin: Add GLTexture::matrix()
This method returns a matrix that transforms normalized or un-normalized
texture coordinates, taking the texture target and y-inversion flag into
account.
2013-05-28 16:35:36 +02:00
Fredrik Höglund 38678bb84f kwin: Don't unbind vertex array buffers
KWin always updates the array buffer binding before it calls GL functions
that reference it, so there is never any need to reset it.

This should eliminate half the calls to glBindBuffer() while painting
the scene.
2013-05-28 16:35:36 +02:00
Fredrik Höglund 159bcf11b6 kwin: Simplify the two setData() methods
Simplify the two setData() methods in GLVertexBuffer by implementing
them in terms of the new map() and unmap() methods.
2013-05-28 16:35:36 +02:00
Fredrik Höglund 188e6d04ca kwin: Expose a map() and an unmap() method in GLVertexBuffer
These methods make it possible to write directly into the buffer object
when building vertex arrays.

If the buffer object cannot be mapped, the map() method will return
a pointer to local memory which will be submitted to the buffer object
with glBufferData() when unmap() is called.
2013-05-28 16:35:36 +02:00
Fredrik Höglund ab8c6aeec3 kwin: Add a new setData() method in GLVertexBuffer
This overload makes it possible to upload data of an arbitrary size and
type into the buffer object.  The intent is for this method to be used
to upload interleaved vertex data.

This commit also adds setVertexCount() and setAttribLayout().

The rationale for decoupling attribute specification from data uploading
is that the attribute formats and layout change less frequently than
the vertex data.

The vertex count is also specified using a separate function to enable
the caller to upload data for multiple draw calls at the same time.
2013-05-28 16:35:35 +02:00
Fredrik Höglund 395ff72555 kwin: Change the way attrib formats are stored in GLVertexBuffer
Store the formats as an array in GLVertexBufferPrivate.

This simplifies the code for enabling the generic vertex arrays,
and also makes it easier to add new arrays.
2013-05-28 16:35:35 +02:00
Fredrik Höglund 1de20a39a0 kwin: Add convenience classes for working with bitfields 2013-05-28 16:35:35 +02:00
Fredrik Höglund 5782d5307e kwin: Add a Color uniform in GLShader
And use it in GLVertexBufferPrivate::bindArrays(). Also store the color
as a QVector4D in GLVertexBufferPrivate.
2013-05-28 16:35:35 +02:00
Fredrik Höglund c41d05d36c kwin: Do some more refactoring in GLVertexBuffer
Consolidate the code for binding and unbinding the vertex arrays into
two new methods called bindArrays() and unbindArrays() respectively.

This patch also removes the three paint implementations, since the only
difference between them is the code that sets up the arrays. The actual
painting code is moved into GLVertexBuffer::render(), which uses the
new methods to bind and unbind the arrays.
2013-05-28 16:35:35 +02:00
Martin Gräßlin 3f69bb0e7f Change Client's clormap to xcb_colormap_t
At same time also renaming variable to follow naming scheme and have a
sensible name. Also moved default value initialization into initializer
list.

REVIEW: 110283
2013-05-28 11:55:39 +02:00
Martin Gräßlin 41b37afa96 Use xcb_timestamp_t for ping window functionality
At same time rename the variable to follow m_camelCase naming scheme and
initialise the variable with default value in ctor.
2013-05-28 11:55:39 +02:00
Martin Gräßlin b39965ec27 Client's userTime related code ported over to XCB
At same time variable user_time renamed to m_userTime to follow naming
scheme.
2013-05-28 11:55:39 +02:00
Martin Gräßlin dc1496f731 Client::killProcess takes xcb_timestamp_t as argument 2013-05-28 11:55:39 +02:00
Martin Gräßlin 48f08bca83 Client::embedClient() takes an xcb_window_t as argument 2013-05-28 11:55:39 +02:00
Martin Gräßlin edefd5f3d2 Port Client::sendClientMessage to XCB 2013-05-28 11:55:39 +02:00
Martin Gräßlin 5632285b1e Client's button(Press|Release)Event and motionNotifyEvent accept xcb_window_t 2013-05-28 11:55:39 +02:00
Martin Gräßlin 7cf461b154 Client::readIcons accepts xcb_window_t as argument 2013-05-28 11:55:39 +02:00
Martin Gräßlin 1b7d2e5ca4 Client::restackWindow() accepts xcb_(window|timestamp)_t as argument
At the same time X define usage is changed to XCB enums.
2013-05-28 11:55:39 +02:00
Martin Gräßlin 2f718bd4fb Client::manager() takes an xcb_window_t as argument 2013-05-28 11:55:39 +02:00
Martin Gräßlin a616d1fe57 Client::decorationId() returns an xcb_window_t 2013-05-28 11:55:39 +02:00
Martin Gräßlin 5dae0cb010 Change Client::window_group to xcb_window_t
At the same time adjust name to m_camelCase to follow naming scheme.
2013-05-28 11:55:38 +02:00
Martin Gräßlin 5afe5f810e Port Client::transient_for handling to XCB
The type of the transient_for related variables are changed to
xcb_window_t. They cannot be Xcb::Window as we don't take ownership over
the transient for window.

Variables are renamed to m_camelCase to follow naming scheme.

A wrapper for retrieving the TransientFor hint is added to the Xcb
Wrappers.
2013-05-28 11:55:38 +02:00
Martin Gräßlin 9d1fb072d4 Find xcb_icccm and link it in KWin core
We need it for porting some aspects of Client to XCB.
2013-05-28 11:55:38 +02:00
Martin Gräßlin aa55cf98ae Port Client's move resize grab window to XCB
Using Xcb::Window to wrap this helper window and port all the used XLib
calls to XCB.

Also renaming the variable to m_ and camel case to follow general naming
scheme.
2013-05-28 11:55:38 +02:00
Martin Gräßlin b4d2129a3f Port Client::client to XCB
Unfortunately the Xcb::Window wrapper cannot be used for the client
window as the client should not be destroyed by KWin.

All the API calls except XSelectInput are changed to xcb and the name is
adjusted to m_client to follow the naming scheme.
2013-05-28 11:55:38 +02:00