D20656: Plotter: Scope GL Program to lifespan of scenegraph node

David Edmundson noreply at phabricator.kde.org
Thu Apr 18 11:17:48 BST 2019


davidedmundson created this revision.
davidedmundson added a reviewer: Plasma.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
davidedmundson requested review of this revision.

REVISION SUMMARY
  Currently the QOpenGLProgram was static. This works when you only have
  one OpenGL context that is never invalidated.
  
  Instead we shoul have a new program created for each context. There is
  no benefit of being static when we can use the cached shader loading.
  
  As we need a program per context, we would need to handle windowChanged
  and sceneGraphInvalidated manually. Instead we can scope the program to
  the QSGNode which will be deleted and recreated on the render thread
  automatically by the scene graph backend.
  
  We can also drop ManagedTextureNode and use
  QSGSimpleTextureNode::setOwnsTexture which does the same thing.
  
  BUG: 403453

TEST PLAN
  Created a CPU load viewer on my panel
  Dragged it to my desktop
  Previously that didn't render anything
  Now it does
  
  I am quite confident it will fix the crashes that we
  see on window moves and handling sceneGraphInvalidated

REPOSITORY
  R296 KDeclarative

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D20656

AFFECTED FILES
  src/qmlcontrols/kquickcontrolsaddons/plotter.cpp
  src/qmlcontrols/kquickcontrolsaddons/plotter.h

To: davidedmundson, #plasma
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190418/3a888060/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list