mirror of
https://github.com/genodelabs/genode.git
synced 2025-05-07 11:08:41 +00:00
parent
edc9545229
commit
cccfd0719d
@ -43,7 +43,7 @@ QNitpickerWindowSurface::QNitpickerWindowSurface(QWindow *window)
|
|||||||
|
|
||||||
QNitpickerWindowSurface::~QNitpickerWindowSurface()
|
QNitpickerWindowSurface::~QNitpickerWindowSurface()
|
||||||
{
|
{
|
||||||
qFree(_backbuffer);
|
free(_backbuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
QPaintDevice *QNitpickerWindowSurface::paintDevice()
|
QPaintDevice *QNitpickerWindowSurface::paintDevice()
|
||||||
@ -61,8 +61,8 @@ QPaintDevice *QNitpickerWindowSurface::paintDevice()
|
|||||||
QImage::Format format = QGuiApplication::primaryScreen()->handle()->format();
|
QImage::Format format = QGuiApplication::primaryScreen()->handle()->format();
|
||||||
QRect geo = _platform_window->geometry();
|
QRect geo = _platform_window->geometry();
|
||||||
unsigned int const bytes_per_pixel = QGuiApplication::primaryScreen()->depth() / 8;
|
unsigned int const bytes_per_pixel = QGuiApplication::primaryScreen()->depth() / 8;
|
||||||
qFree(_backbuffer);
|
free(_backbuffer);
|
||||||
_backbuffer = (unsigned char*)qMalloc(geo.width() * geo.height() * bytes_per_pixel);
|
_backbuffer = (unsigned char*)malloc(geo.width() * geo.height() * bytes_per_pixel);
|
||||||
_image = QImage(_backbuffer, geo.width(), geo.height(), geo.width() * bytes_per_pixel, format);
|
_image = QImage(_backbuffer, geo.width(), geo.height(), geo.width() * bytes_per_pixel, format);
|
||||||
|
|
||||||
if (verbose)
|
if (verbose)
|
||||||
@ -90,9 +90,7 @@ void QNitpickerWindowSurface::flush(QWindow *window, const QRegion ®ion, cons
|
|||||||
|
|
||||||
unsigned int const bytes_per_pixel = _image.depth() / 8;
|
unsigned int const bytes_per_pixel = _image.depth() / 8;
|
||||||
|
|
||||||
for (int i = 0; i < region.rects().size(); i++) {
|
for (QRect rect : region) {
|
||||||
|
|
||||||
QRect rect(region.rects()[i]);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* It happened that after resizing a window, the given flush region was
|
* It happened that after resizing a window, the given flush region was
|
||||||
|
Loading…
x
Reference in New Issue
Block a user