[QNX} Remove adjustBufferSize from the egl window

setGeometry will adjust the buffer for an egl window when a egl surface is created.
Adjusting the buffer somewhere else can be potentially harmful. Another reason is that
every egl window has a buffer on its own (unlike raster windows) so we do not have to
check if we have to create a buffer after reparanting.

Change-Id: I01406867a0dab598dac7d86e1f1e28ca9736a299
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
bb10
Fabian Bumberger 2014-02-01 12:26:09 +01:00 committed by The Qt Project
parent 29cd7db616
commit 74d84f32da
6 changed files with 8 additions and 12 deletions

View File

@ -170,13 +170,6 @@ QSize QQnxEglWindow::requestedBufferSize() const
return m_requestedBufferSize;
}
void QQnxEglWindow::adjustBufferSize()
{
const QSize windowSize = window()->size();
if (windowSize != bufferSize())
setBufferSize(windowSize);
}
void QQnxEglWindow::setPlatformOpenGLContext(QQnxGLContext *platformOpenGLContext)
{
// This function does not take ownership of the platform gl context.

View File

@ -68,8 +68,6 @@ public:
// Called by QQnxGLContext::createSurface()
QSize requestedBufferSize() const;
void adjustBufferSize();
protected:
int pixelFormat() const;
void resetBuffers();

View File

@ -162,6 +162,12 @@ QQnxBuffer &QQnxRasterWindow::renderBuffer()
return m_buffers[m_currentBufferIndex];
}
void QQnxRasterWindow::setParent(const QPlatformWindow *wnd)
{
QQnxWindow::setParent(wnd);
adjustBufferSize();
}
void QQnxRasterWindow::adjustBufferSize()
{
// When having a raster window we don't need any buffers, since

View File

@ -60,6 +60,8 @@ public:
bool hasBuffers() const { return !bufferSize().isEmpty(); }
void setParent(const QPlatformWindow *window);
void adjustBufferSize();
protected:

View File

@ -398,8 +398,6 @@ void QQnxWindow::setParent(const QPlatformWindow *window)
joinWindowGroup(QByteArray());
}
adjustBufferSize();
m_screen->updateHierarchy();
}

View File

@ -78,7 +78,6 @@ public:
WId winId() const { return (WId)m_window; }
screen_window_t nativeHandle() const { return m_window; }
virtual void adjustBufferSize() = 0;
void setBufferSize(const QSize &size);
QSize bufferSize() const { return m_bufferSize; }