Blitting improvements

* Use a single QImage copy for actual drawing
* Use std::array and std::unique_ptr for image buffers
* Signal immediately after copying the buffer to internal image
This commit is contained in:
Cacodemon345
2021-12-21 16:38:13 +06:00
parent bbb0b38d31
commit 67a0f7a85f
9 changed files with 17 additions and 25 deletions

View File

@@ -18,9 +18,6 @@ void RendererCommon::onPaint(QPaintDevice* device) {
painter.fillRect(0, 0, device->width(), device->height(), QColorConstants::Black);
painter.setCompositionMode(QPainter::CompositionMode_Plus);
painter.drawImage(destination, image, source);
// "release" image, reducing it's refcount, so renderstack::blit()
// won't have to reallocate
image = QImage();
}
static void integer_scale(double *d, double *g) {