Changeset View
Changeset View
Standalone View
Standalone View
plugins/scenes/opengl/scene_opengl.cpp
Show First 20 Lines • Show All 2104 Lines • ▼ Show 20 Line(s) | 2089 | while (it != m_cache.end()) { | |||
---|---|---|---|---|---|
2105 | } | 2105 | } | ||
2106 | } | 2106 | } | ||
2107 | } | 2107 | } | ||
2108 | 2108 | | |||
2109 | QSharedPointer<GLTexture> DecorationShadowTextureCache::getTexture(SceneOpenGLShadow *shadow) | 2109 | QSharedPointer<GLTexture> DecorationShadowTextureCache::getTexture(SceneOpenGLShadow *shadow) | ||
2110 | { | 2110 | { | ||
2111 | Q_ASSERT(shadow->hasDecorationShadow()); | 2111 | Q_ASSERT(shadow->hasDecorationShadow()); | ||
2112 | unregister(shadow); | 2112 | unregister(shadow); | ||
2113 | const auto &decoShadow = shadow->decorationShadow(); | 2113 | const auto &decoShadow = shadow->decorationShadow().toStrongRef(); | ||
2114 | Q_ASSERT(!decoShadow.isNull()); | 2114 | Q_ASSERT(!decoShadow.isNull()); | ||
2115 | auto it = m_cache.find(decoShadow.data()); | 2115 | auto it = m_cache.find(decoShadow.data()); | ||
2116 | if (it != m_cache.end()) { | 2116 | if (it != m_cache.end()) { | ||
2117 | Q_ASSERT(!it.value().shadows.contains(shadow)); | 2117 | Q_ASSERT(!it.value().shadows.contains(shadow)); | ||
2118 | it.value().shadows << shadow; | 2118 | it.value().shadows << shadow; | ||
2119 | return it.value().texture; | 2119 | return it.value().texture; | ||
2120 | } | 2120 | } | ||
2121 | Data d; | 2121 | Data d; | ||
▲ Show 20 Lines • Show All 598 Lines • Show Last 20 Lines |