diff options
author | Laszlo Agocs <[email protected]> | 2016-06-29 14:53:31 +0200 |
---|---|---|
committer | Laszlo Agocs <[email protected]> | 2016-07-01 11:36:51 +0000 |
commit | 6b8070d5a9598caa1c42753bb9034eb6137e7237 (patch) | |
tree | 10e38da8306ae34d7a09df96b60a6a2399b7ccaa /src/quick/scenegraph/adaptations/software/qsgsoftwarecontext.cpp | |
parent | 7019f7c3237d1894ad2e3ccc4ca9c366a9bba2e4 (diff) |
Make QSGRenderContext::invalidate a no-op
Calling invalidate() from the destructor is a bad idea since what we get
is the QSGRenderContext implementation, not the one from the more-derived
class. (it could have been intentional as well - it is confusing in any case
and unnecessary).
There is no adaptation relying in this anyways - invalidate() is always
invoked manually, typically from windowDestroyed. This is very good since it
avoids the at first less-than-obvious trouble with emitting invalidated()
from the rendercontext dtor. (that can in turn can trigger random amount of
code potentially calling back into the rendercontext and rely on virtuals
which are not functional anymore due to the vtable not there for the
functions in the more-derived class)
Change-Id: I44d78c5a819230f7006d33d4341eff45d8f77c88
Reviewed-by: Andy Nichols <[email protected]>
Diffstat (limited to 'src/quick/scenegraph/adaptations/software/qsgsoftwarecontext.cpp')
-rw-r--r-- | src/quick/scenegraph/adaptations/software/qsgsoftwarecontext.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarecontext.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarecontext.cpp index 921071e32e..d9a298f855 100644 --- a/src/quick/scenegraph/adaptations/software/qsgsoftwarecontext.cpp +++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarecontext.cpp @@ -134,7 +134,8 @@ void QSGSoftwareRenderContext::initializeIfNeeded() void QSGSoftwareRenderContext::invalidate() { - QSGRenderContext::invalidate(); + m_sg->renderContextInvalidated(this); + emit invalidated(); } QSGTexture *QSGSoftwareRenderContext::createTexture(const QImage &image, uint flags) const |