Plotter: Scope GL Program to lifespan of scenegraph node
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 It should fix the crashes that we see on window moves and handling sceneGraphInvalidated Reviewers: #plasma Subscribers: kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D20656
parent
d9a0365c
Please register or sign in to comment