Bug 169943
| Summary: | When the browser window is activated or deactivated, images can flash | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> |
| Component: | Images | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | cdumez, jonlee, kling, sabouhallawa, simon.fraser, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Local Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Simon Fraser (smfr)
We can get flashes of undecided images when the browser window goes between foreground and background.
This happens because tile size changes trigger painting, and we may have thrown away decoded data via the MemoryCache pruning timer, so we have to re-decode async and thus flash.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Simon Fraser (smfr)
So the memory cache prunes on a timer, and destroys decoded image data via:
* frame #0: 0x0000000117c78a9c WebCore`WebCore::BitmapImage::destroyDecodedData(this=0x0000000123a345c0, destroyAll=true) at BitmapImage.cpp:68
frame #1: 0x0000000117cbade3 WebCore`WebCore::CachedImage::destroyDecodedData(this=0x00000001297bf200) at CachedImage.cpp:489
frame #2: 0x0000000119987629 WebCore`WebCore::MemoryCache::pruneLiveResourcesToSize(this=0x000000011b9ff1d0, targetSize=95630128, shouldDestroyDecodedDataForAllLiveResources=false) at MemoryCache.cpp:338
frame #3: 0x0000000119987486 WebCore`WebCore::MemoryCache::pruneLiveResources(this=0x000000011b9ff1d0, shouldDestroyDecodedDataForAllLiveResources=false) at MemoryCache.cpp:265
frame #4: 0x000000011998526a WebCore`WebCore::MemoryCache::prune(this=0x000000011b9ff1d0) at MemoryCache.cpp:731
...
frame #10: 0x000000011998cff9 WebCore`std::__1::__function::__func<std::__1::__bind<void (WebCore::MemoryCache::*&)(), WebCore::MemoryCache*>, std::__1::allocator<std::__1::__bind<void (WebCore::MemoryCache::*&)(), WebCore::MemoryCache*> >, void ()>::operator(this=0x000000011b9ff3a0)() at functional:1437
frame #11: 0x0000000117ab6b0a WebCore`std::__1::function<void ()>::operator(this=0x000000011b9ff3a0)() const at functional:1817
frame #12: 0x0000000117ab6a29 WebCore`WebCore::Timer::fired(this=0x000000011b9ff360) at Timer.h:148
Radar WebKit Bug Importer
<rdar://problem/31221177>
Simon Fraser (smfr)
Said, I think you've fixed this?
Jon Lee
*** This bug has been marked as a duplicate of bug 170640 ***