[Webkit-unassigned] [Bug 40377] [Qt] When Qt graphicslayer gets a setNeedsDisplay (ie all) it shouldn't record the rect then

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 11 13:50:48 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=40377





--- Comment #4 from Sam Magnuson <smagnuson at netflix.com>  2010-06-11 13:50:48 PST ---
(In reply to comment #2)
> (From update of attachment 58274 [details])
> > @@ -458,10 +458,14 @@ void GraphicsLayerQtImpl::paint(QPainter* painter, const QStyleOptionGraphicsIte
> >      switch (m_currentContent.contentType) {
> >      case HTMLContentType:
> >          if (m_state.drawsContent) {
> > -            QPixmap backingStore;
> > -            // We might need to recache, in case we try to paint and the cache was purged (e.g. if it was full).
> > -            if (!QPixmapCache::find(m_backingStoreKey, &backingStore) || backingStore.size() != m_size.toSize())
> > -                backingStore = recache(QRegion(m_state.contentsRect));
> > +			QRegion region;
> > +			if( m_pendingContent.updateAll )
> > +				region |= boundingRect().toRect();
> > +			else
> > +				region |= m_pendingContent.regionToUpdate;
> > +			m_pendingContent.updateAll = false;
> > +			m_pendingContent.regionToUpdate = QRegion();
> > +            const QPixmap backingStore = recache(region);
> >              painter->drawPixmap(0, 0, backingStore);
> 
> This part doesn't seem correct - if we got to this point where we paint and there's nothing in the cache, we might need to paint more than the dirty region. This might occur, for example, when the cache was purged because it was full and some other item obscuring this one has moved away. 
> 

I'm not sure I understand. When something is dirty in webkit we'll get the setNeedsDisplay(). Thus the pendingContent updateAll/regionToUpdate knows what is dirty. If graphicsview needs to paint we'll get a paint for ourselves and our children - inside of recache() it will determine if the cache'd pixmap is already gone and if so it will still paint QRegion(0,0,m_size.width(),m_size.height()). Looking it up in ::paint and in ::recache seems unnecessary to me.

> 
> 
> 
> TtThi

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list