<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>169943</bug_id>
          
          <creation_ts>2017-03-21 20:12:51 -0700</creation_ts>
          <short_desc>When the browser window is activated or deactivated, images can flash</short_desc>
          <delta_ts>2017-05-29 15:53:51 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Images</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>170640</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Fraser (smfr)">simon.fraser</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cdumez</cc>
    
    <cc>jonlee</cc>
    
    <cc>kling</cc>
    
    <cc>sabouhallawa</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1289951</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2017-03-21 20:12:51 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1289956</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2017-03-21 20:48:05 -0700</bug_when>
    <thetext>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&lt;std::__1::__bind&lt;void (WebCore::MemoryCache::*&amp;)(), WebCore::MemoryCache*&gt;, std::__1::allocator&lt;std::__1::__bind&lt;void (WebCore::MemoryCache::*&amp;)(), WebCore::MemoryCache*&gt; &gt;, void ()&gt;::operator(this=0x000000011b9ff3a0)() at functional:1437
    frame #11: 0x0000000117ab6b0a WebCore`std::__1::function&lt;void ()&gt;::operator(this=0x000000011b9ff3a0)() const at functional:1817
    frame #12: 0x0000000117ab6a29 WebCore`WebCore::Timer::fired(this=0x000000011b9ff360) at Timer.h:148</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1290477</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2017-03-23 09:38:13 -0700</bug_when>
    <thetext>&lt;rdar://problem/31221177&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1313402</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2017-05-27 08:21:13 -0700</bug_when>
    <thetext>Said, I think you&apos;ve fixed this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1313616</commentid>
    <comment_count>4</comment_count>
    <who name="Jon Lee">jonlee</who>
    <bug_when>2017-05-29 15:53:51 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 170640 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>