Code review comment for lp:~verzegnassi-stefano/ubuntu-docviewer-app/lok-qml-async-imageprovider

Revision history for this message
Stefano Verzegnassi (verzegnassi-stefano) wrote :

I had a further look at the issue.
It seems that QQuickPixmapCache calls QQuickImageResponse::cancel() several times when the LOK viewer is loaded.

We properly synchronize the threads when we queue/dequeue the task from the engine but, if the task is currently being processed, it gets deleted during its execution.

We need to ensure that the GUI thread (where RenderEngine lives) and the LOImageResponse are in sync when we delete the task.
I guess we'd be better not to give ownership of the task to a class that lives in another thread, and let RenderEngine handles its tasks at its best.

We only need to subscribe to the RenderEngine's signals, using a Qt::BlockingQueuedConnection.

Roman, I remember that the usage of a blocking connection was okay for you before you updated the RenderEngine.
What do you think?

« Back to merge proposal