mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32: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();
|
||||
|
||||
template <typename T>
|
||||
T topDecoPixmap() const;
|
||||
template <typename T>
|
||||
T leftDecoPixmap() const;
|
||||
template <typename T>
|
||||
T bottomDecoPixmap() const;
|
||||
template <typename T>
|
||||
T rightDecoPixmap() const;
|
||||
inline xcb_render_picture_t topDecoPixmap() const
|
||||
{
|
||||
return picture(TopPixmap);
|
||||
}
|
||||
inline xcb_render_picture_t leftDecoPixmap() const
|
||||
{
|
||||
return picture(LeftPixmap);
|
||||
}
|
||||
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.
|
||||
|
@ -141,34 +149,6 @@ private:
|
|||
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
|
||||
|
||||
#endif
|
||||
|
|
|
@ -555,10 +555,10 @@ void SceneXrender::Window::performPaint(int mask, QRegion region, WindowPaintDat
|
|||
}
|
||||
if (redirector) {
|
||||
redirector->ensurePixmapsPainted();
|
||||
left = redirector->leftDecoPixmap<xcb_render_picture_t>();
|
||||
top = redirector->topDecoPixmap<xcb_render_picture_t>();
|
||||
right = redirector->rightDecoPixmap<xcb_render_picture_t>();
|
||||
bottom = redirector->bottomDecoPixmap<xcb_render_picture_t>();
|
||||
left = redirector->leftDecoPixmap();
|
||||
top = redirector->topDecoPixmap();
|
||||
right = redirector->rightDecoPixmap();
|
||||
bottom = redirector->bottomDecoPixmap();
|
||||
}
|
||||
if (!noBorder) {
|
||||
MAP_RECT_TO_TARGET(dtr);
|
||||
|
|
Loading…
Add table
Reference in a new issue