Compositor: Rename shm to sharedMemory

sharedMemory is much clearer and will increase the readability of the code and
API.

Change-Id: Ibb6d7424fa8d44a94a0f4ddf476a564eb235323f
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
This commit is contained in:
Johan Klokkhammer Helsing 2016-07-01 09:44:46 +02:00 committed by Johan Helsing
parent 05d8629760
commit cf1bf1b684
2 changed files with 10 additions and 10 deletions

View File

@ -39,7 +39,7 @@
#include <QtWaylandClient/private/qwaylandshm_p.h> #include <QtWaylandClient/private/qwaylandshm_p.h>
#include <QtWaylandClient/private/qwaylanddisplay_p.h> #include <QtWaylandClient/private/qwaylanddisplay_p.h>
#include "qwaylandshmformathelper_p.h" #include "qwaylandsharedmemoryformathelper_p.h"
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
@ -73,12 +73,12 @@ bool QWaylandShm::formatSupported(QImage::Format format) const
wl_shm_format QWaylandShm::formatFrom(QImage::Format format) wl_shm_format QWaylandShm::formatFrom(QImage::Format format)
{ {
return QWaylandShmFormatHelper::fromQImageFormat(format); return QWaylandSharedMemoryFormatHelper::fromQImageFormat(format);
} }
QImage::Format QWaylandShm::formatFrom(wl_shm_format format) QImage::Format QWaylandShm::formatFrom(wl_shm_format format)
{ {
return QWaylandShmFormatHelper::fromWaylandShmFormat(format); return QWaylandSharedMemoryFormatHelper::fromWaylandShmFormat(format);
} }
} }

View File

@ -37,8 +37,8 @@
** **
****************************************************************************/ ****************************************************************************/
#ifndef QWAYLANDSHMFORMATHELPER_H #ifndef QWAYLANDSHAREDMEMORYFORMATHELPER_H
#define QWAYLANDSHMFORMATHELPER_H #define QWAYLANDSHAREDMEMORYFORMATHELPER_H
#include <QtGui/QImage> #include <QtGui/QImage>
@ -47,7 +47,7 @@
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QWaylandShmFormatHelper class QWaylandSharedMemoryFormatHelper
{ {
public: public:
static inline wl_shm_format fromQImageFormat(QImage::Format format); static inline wl_shm_format fromQImageFormat(QImage::Format format);
@ -100,7 +100,7 @@ private:
} }
}; };
wl_shm_format QWaylandShmFormatHelper::fromQImageFormat(QImage::Format format) wl_shm_format QWaylandSharedMemoryFormatHelper::fromQImageFormat(QImage::Format format)
{ {
Array array = getData(); Array array = getData();
if (array.size <= size_t(format)) if (array.size <= size_t(format))
@ -108,7 +108,7 @@ wl_shm_format QWaylandShmFormatHelper::fromQImageFormat(QImage::Format format)
return array.data[format]; return array.data[format];
} }
QImage::Format QWaylandShmFormatHelper::fromWaylandShmFormat(wl_shm_format format) QImage::Format QWaylandSharedMemoryFormatHelper::fromWaylandShmFormat(wl_shm_format format)
{ {
Array array = getData(); Array array = getData();
for (size_t i = 0; i < array.size; i++) { for (size_t i = 0; i < array.size; i++) {
@ -118,7 +118,7 @@ QImage::Format QWaylandShmFormatHelper::fromWaylandShmFormat(wl_shm_format forma
return QImage::Format_Invalid; return QImage::Format_Invalid;
} }
QVector<wl_shm_format> QWaylandShmFormatHelper::supportedWaylandFormats() QVector<wl_shm_format> QWaylandSharedMemoryFormatHelper::supportedWaylandFormats()
{ {
QVector<wl_shm_format> retFormats; QVector<wl_shm_format> retFormats;
Array array = getData(); Array array = getData();
@ -133,4 +133,4 @@ QVector<wl_shm_format> QWaylandShmFormatHelper::supportedWaylandFormats()
QT_END_NAMESPACE QT_END_NAMESPACE
#endif //QWAYLANDSHMFORMATHELPER_H #endif //QWAYLANDSHAREDMEMORYFORMATHELPER_H