Hide all OpenGL internals from KisCanvas
ClosedPublic

Authored by abrahams on Aug 31 2015, 7:39 PM.

Details

Summary

This moves the troublesome KisOpenGLTextures entirely into KisOpenGLCanvas. This will make it easier to reason about potential OpenGL related crashes.

Diff Detail

Repository
R8 Calligra
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
abrahams updated this revision to Diff 679.Aug 31 2015, 7:39 PM
abrahams retitled this revision from to Hide all OpenGL internals from KisCanvas.
abrahams updated this object.
abrahams edited the test plan for this revision. (Show Details)
abrahams added reviewers: dkazakov, rempt.
abrahams updated this object.Aug 31 2015, 7:52 PM
dkazakov requested changes to this revision.Sep 1 2015, 9:20 AM
dkazakov edited edge metadata.

Hi, Michael!

Your patch is great! This split has been awaited for many years now and we should really do it. Right now there is only one problem with setDisplayFilter(), which I commented inline. It is the only block before going to master.

krita/ui/canvas/kis_canvas2.cpp
491–492

What is the problem of updating the entire canvas every time? setDisplayFilter() is called every time the user changes a thing in the LUT Docker, which can happen up to tablet's events rate speed, which is about 10-15 ms. Updating entire image takes up to a second on a decent-sized images. So this check is a must here.

krita/ui/opengl/kis_opengl_canvas2.cpp
209

The call to setInternalColorManagementActive() should always happen no matter if you use its returned value or not. The returned value just says how drastic the result is.

This revision now requires changes to proceed.Sep 1 2015, 9:20 AM
abrahams updated this revision to Diff 684.Sep 1 2015, 3:47 PM
abrahams edited edge metadata.
abrahams updated this object.

Restore refresh optimization in setDisplayFilter

abrahams updated this revision to Diff 685.Sep 1 2015, 3:48 PM
abrahams edited edge metadata.

Remove a comment

abrahams marked 2 inline comments as done.Sep 1 2015, 3:50 PM

Hi Dmitry - I'm glad you like the patch. I restored the original refresh logic. Not sure why I thought it had to be removed in the refactor.

rempt accepted this revision.Sep 1 2015, 5:58 PM
rempt edited edge metadata.

Should be fine now :-)

This revision was automatically updated to reflect the committed changes.