[Webkit-unassigned] [Bug 106842] adding support for DiscardablePixelRef for caching lazily decoded images

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 28 21:26:47 PST 2013


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





--- Comment #110 from Min Qin <qinmin at chromium.org>  2013-01-28 21:28:45 PST ---
(In reply to comment #109)
> (In reply to comment #108)
> > (In reply to comment #107)
> > > (In reply to comment #101)
> > > > (In reply to comment #100)
> > > > > (In reply to comment #99)
> > > > > 
> > > > > > >> Source/WebCore/platform/graphics/chromium/DiscardablePixelRef.cpp:89
> > > > > > >> +    if (!m_lockedMemory && m_discardable->lock())
> > > > > > > 
> > > > > > > Could m_discardable ever be 0 here?
> > > > > > 
> > > > > > it shouldn't. If allocAndLockDiscardableMemory failed, we should not use the DiscardablePixelRef anymore.
> > > > > 
> > > > > Will onLockPixels() still be called?
> > > > 
> > > > In DiscardableMemoryAllocator, if allocAndLockDiscardableMemory() returns false, we will fall back to the heap allocator. So a skMallocPixelRef will be created instead of this one. And onLockPixels() will be called on the SkMallocPixelRef.
> > > 
> > > Right, add an ASSERT(m_discardable) then.
> > 
> > I think adding an ASSERT() here will not provide any benefit. If m_discardable is NULL, we crash anyway in the next statement.
> 
> That response verges on tautology.  Please add the ASSERT.

ok, will do that in a separate patch

-- 
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