kis_opengl_canvas2.cpp (krita-5.1.3.tar.xz) | : | kis_opengl_canvas2.cpp (krita-5.1.4.tar.xz) | ||
---|---|---|---|---|
skipping to change at line 203 | skipping to change at line 203 | |||
cfg.writeEntry("canvasState", "OPENGL_PAINT_STARTED"); | cfg.writeEntry("canvasState", "OPENGL_PAINT_STARTED"); | |||
} | } | |||
KisOpenglCanvasDebugger::instance()->nofityPaintRequested(); | KisOpenglCanvasDebugger::instance()->nofityPaintRequested(); | |||
QRect canvasImageDirtyRect = d->canvasImageDirtyRect & rect(); | QRect canvasImageDirtyRect = d->canvasImageDirtyRect & rect(); | |||
d->canvasImageDirtyRect = QRect(); | d->canvasImageDirtyRect = QRect(); | |||
d->renderer->paintCanvasOnly(canvasImageDirtyRect, updateRect); | d->renderer->paintCanvasOnly(canvasImageDirtyRect, updateRect); | |||
{ | { | |||
QPainter gc(this); | QPainter gc(this); | |||
if (!updateRect.isEmpty()) { | if (!updateRect.isEmpty()) { | |||
gc.setClipRect(kisGrowRect(updateRect, 1)); | gc.setClipRect(updateRect); | |||
} | } | |||
QRect decorationsBoundingRect = coordinatesConverter()->imageRectInWidge tPixels().toAlignedRect(); | QRect decorationsBoundingRect = coordinatesConverter()->imageRectInWidge tPixels().toAlignedRect(); | |||
if (!updateRect.isEmpty()) { | if (!updateRect.isEmpty()) { | |||
decorationsBoundingRect &= updateRect; | decorationsBoundingRect &= updateRect; | |||
} | } | |||
drawDecorations(gc, decorationsBoundingRect); | drawDecorations(gc, decorationsBoundingRect); | |||
} | } | |||
skipping to change at line 235 | skipping to change at line 235 | |||
KisConfig cfg(false); | KisConfig cfg(false); | |||
cfg.writeEntry("canvasState", "OPENGL_SUCCESS"); | cfg.writeEntry("canvasState", "OPENGL_SUCCESS"); | |||
OPENGL_SUCCESS = true; | OPENGL_SUCCESS = true; | |||
} | } | |||
} | } | |||
void KisOpenGLCanvas2::paintEvent(QPaintEvent *e) | void KisOpenGLCanvas2::paintEvent(QPaintEvent *e) | |||
{ | { | |||
KIS_SAFE_ASSERT_RECOVER_RETURN(!d->updateRect); | KIS_SAFE_ASSERT_RECOVER_RETURN(!d->updateRect); | |||
d->updateRect = e->rect(); | if (qFuzzyCompare(devicePixelRatioF(), qRound(devicePixelRatioF()))) { | |||
/** | ||||
* Enable partial updates **only** for the case when we have | ||||
* integer scaling. There is a bug in Qt that causes artifacts | ||||
* otherwise: | ||||
* | ||||
* See https://bugs.kde.org/show_bug.cgi?id=441216 | ||||
*/ | ||||
d->updateRect = e->rect(); | ||||
} | ||||
QOpenGLWidget::paintEvent(e); | QOpenGLWidget::paintEvent(e); | |||
d->updateRect = boost::none; | d->updateRect = boost::none; | |||
} | } | |||
void KisOpenGLCanvas2::paintToolOutline(const KisOptimizedBrushOutline &path) | void KisOpenGLCanvas2::paintToolOutline(const KisOptimizedBrushOutline &path) | |||
{ | { | |||
d->renderer->paintToolOutline(path); | d->renderer->paintToolOutline(path); | |||
} | } | |||
bool KisOpenGLCanvas2::isBusy() const | bool KisOpenGLCanvas2::isBusy() const | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 12 lines changed or added |