mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-24 02:42:50 +00:00
kwin: convert KWin::PaintRedirector decoration pixmap getters to non-template methods
there is only one paint redirector implementation and it always returns xcb_render_picture_t Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
14389df81f
commit
ad34b3c654
2 changed files with 20 additions and 40 deletions
|
@ -68,14 +68,22 @@ public:
|
||||||
}
|
}
|
||||||
void resizePixmaps();
|
void resizePixmaps();
|
||||||
|
|
||||||
template <typename T>
|
inline xcb_render_picture_t topDecoPixmap() const
|
||||||
T topDecoPixmap() const;
|
{
|
||||||
template <typename T>
|
return picture(TopPixmap);
|
||||||
T leftDecoPixmap() const;
|
}
|
||||||
template <typename T>
|
inline xcb_render_picture_t leftDecoPixmap() const
|
||||||
T bottomDecoPixmap() const;
|
{
|
||||||
template <typename T>
|
return picture(LeftPixmap);
|
||||||
T rightDecoPixmap() const;
|
}
|
||||||
|
inline xcb_render_picture_t bottomDecoPixmap() const
|
||||||
|
{
|
||||||
|
return picture(BottomPixmap);
|
||||||
|
}
|
||||||
|
inline xcb_render_picture_t rightDecoPixmap() const
|
||||||
|
{
|
||||||
|
return picture(RightPixmap);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used by Deleted::copyToDeleted() to move the PaintRedirector to the Deleted.
|
* Used by Deleted::copyToDeleted() to move the PaintRedirector to the Deleted.
|
||||||
|
@ -141,34 +149,6 @@ private:
|
||||||
QImage m_scratchImage;
|
QImage m_scratchImage;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
|
||||||
inline
|
|
||||||
xcb_render_picture_t PaintRedirector::bottomDecoPixmap() const
|
|
||||||
{
|
|
||||||
return picture(BottomPixmap);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <>
|
|
||||||
inline
|
|
||||||
xcb_render_picture_t PaintRedirector::leftDecoPixmap() const
|
|
||||||
{
|
|
||||||
return picture(LeftPixmap);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <>
|
|
||||||
inline
|
|
||||||
xcb_render_picture_t PaintRedirector::rightDecoPixmap() const
|
|
||||||
{
|
|
||||||
return picture(RightPixmap);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <>
|
|
||||||
inline
|
|
||||||
xcb_render_picture_t PaintRedirector::topDecoPixmap() const
|
|
||||||
{
|
|
||||||
return picture(TopPixmap);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -555,10 +555,10 @@ void SceneXrender::Window::performPaint(int mask, QRegion region, WindowPaintDat
|
||||||
}
|
}
|
||||||
if (redirector) {
|
if (redirector) {
|
||||||
redirector->ensurePixmapsPainted();
|
redirector->ensurePixmapsPainted();
|
||||||
left = redirector->leftDecoPixmap<xcb_render_picture_t>();
|
left = redirector->leftDecoPixmap();
|
||||||
top = redirector->topDecoPixmap<xcb_render_picture_t>();
|
top = redirector->topDecoPixmap();
|
||||||
right = redirector->rightDecoPixmap<xcb_render_picture_t>();
|
right = redirector->rightDecoPixmap();
|
||||||
bottom = redirector->bottomDecoPixmap<xcb_render_picture_t>();
|
bottom = redirector->bottomDecoPixmap();
|
||||||
}
|
}
|
||||||
if (!noBorder) {
|
if (!noBorder) {
|
||||||
MAP_RECT_TO_TARGET(dtr);
|
MAP_RECT_TO_TARGET(dtr);
|
||||||
|
|
Loading…
Add table
Reference in a new issue