Changeset View
Changeset View
Standalone View
Standalone View
scene.cpp
Show First 20 Lines • Show All 710 Lines • ▼ Show 20 Line(s) | 710 | if (m_previousPixmap.isNull() || !m_previousPixmap->isDiscarded()) { | |||
---|---|---|---|---|---|
711 | return; | 711 | return; | ||
712 | } | 712 | } | ||
713 | m_referencePixmapCounter--; | 713 | m_referencePixmapCounter--; | ||
714 | if (m_referencePixmapCounter == 0) { | 714 | if (m_referencePixmapCounter == 0) { | ||
715 | m_previousPixmap.reset(); | 715 | m_previousPixmap.reset(); | ||
716 | } | 716 | } | ||
717 | } | 717 | } | ||
718 | 718 | | |||
719 | void Scene::Window::pixmapDiscarded() | 719 | void Scene::Window::discardPixmap() | ||
720 | { | 720 | { | ||
721 | if (!m_currentPixmap.isNull()) { | 721 | if (!m_currentPixmap.isNull()) { | ||
722 | if (m_currentPixmap->isValid()) { | 722 | if (m_currentPixmap->isValid()) { | ||
723 | m_previousPixmap.reset(m_currentPixmap.take()); | 723 | m_previousPixmap.reset(m_currentPixmap.take()); | ||
724 | m_previousPixmap->markAsDiscarded(); | 724 | m_previousPixmap->markAsDiscarded(); | ||
725 | } else { | 725 | } else { | ||
726 | m_currentPixmap.reset(); | 726 | m_currentPixmap.reset(); | ||
727 | } | 727 | } | ||
728 | } | 728 | } | ||
729 | } | 729 | } | ||
730 | 730 | | |||
731 | void Scene::Window::updatePixmap() | ||||
732 | { | ||||
733 | if (m_currentPixmap.isNull()) { | ||||
734 | m_currentPixmap.reset(createWindowPixmap()); | ||||
735 | } | ||||
736 | if (!m_currentPixmap->isValid()) { | ||||
737 | m_currentPixmap->create(); | ||||
738 | } | ||||
739 | } | ||||
740 | | ||||
731 | void Scene::Window::discardShape() | 741 | void Scene::Window::discardShape() | ||
732 | { | 742 | { | ||
733 | // it is created on-demand and cached, simply | 743 | // it is created on-demand and cached, simply | ||
734 | // reset the flag | 744 | // reset the flag | ||
735 | m_bufferShapeIsValid = false; | 745 | m_bufferShapeIsValid = false; | ||
736 | invalidateQuadsCache(); | 746 | invalidateQuadsCache(); | ||
737 | } | 747 | } | ||
738 | 748 | | |||
▲ Show 20 Lines • Show All 451 Lines • Show Last 20 Lines |