Commit 3d9136d3 authored by Sebastien Jourdain's avatar Sebastien Jourdain Committed by Kitware Robot
Browse files

Merge topic 'pvw-enable-streaming'

4614ed42

 PVW: Try to handle --enable-streaming argument
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Reviewed-by: Sebastien Jourdain's avatarSebastien Jourdain <sebastien.jourdain@kitware.com>
Acked-by: Aaron Knoll's avatarAaron Knoll <knolla@gmail.com>
Merge-request: !2889
parents a8962550 4614ed42
Pipeline #126993 failed with stage
in 0 seconds
......@@ -547,7 +547,27 @@ class ParaViewWebPublishImageDelivery(ParaViewWebProtocol):
realViewId = sView.GetGlobalIDAsString()
if realViewId in self.viewsInAnimations:
progressRendering = self.trackingViews[realViewId]['streaming']
self.viewsInAnimations.remove(realViewId)
if progressRendering:
self.progressiveRender(realViewId)
def progressiveRender(self, viewId = '-1'):
sView = self.getView(viewId)
realViewId = sView.GetGlobalIDAsString()
if realViewId in self.viewsInAnimations:
return
if sView.GetSession().GetPendingProgress():
reactor.callLater(self.deltaStaleTimeBeforeRender, lambda: self.progressiveRender(viewId))
else:
again = sView.StreamingUpdate(True)
self.pushRender(realViewId, True)
if again:
reactor.callLater(0.001, lambda: self.progressiveRender(viewId))
@exportRpc("viewport.image.push")
......@@ -642,7 +662,7 @@ class ParaViewWebPublishImageDelivery(ParaViewWebProtocol):
tagStart = self.getApplication().AddObserver('StartInteractionEvent', startCallback)
tagStop = self.getApplication().AddObserver('EndInteractionEvent', stopCallback)
# TODO do we need self.getApplication().AddObserver('ResetActiveView', resetActiveView())
self.trackingViews[realViewId] = { 'tags': [tag, tagStart, tagStop], 'observerCount': 1, 'mtime': 0, 'enabled': True, 'quality': 100 }
self.trackingViews[realViewId] = { 'tags': [tag, tagStart, tagStop], 'observerCount': 1, 'mtime': 0, 'enabled': True, 'quality': 100, 'streaming': sView.GetClientSideObject().GetEnableStreaming() }
else:
# There is an observer on this view already
self.trackingViews[realViewId]['observerCount'] += 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment