<?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>76666</bug_id>
          
          <creation_ts>2012-01-19 14:47:31 -0800</creation_ts>
          <short_desc>[Chromium] Ganesh&apos;s Texture Cache is too small</short_desc>
          <delta_ts>2012-01-27 15:42:24 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Canvas</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jeff Timanus">twiz</reporter>
          <assigned_to name="Jeff Timanus">twiz</assigned_to>
          <cc>bsalomon</cc>
    
    <cc>mdelaney7</cc>
    
    <cc>nduca</cc>
    
    <cc>senorblanco</cc>
    
    <cc>vangelis</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>539053</commentid>
    <comment_count>0</comment_count>
    <who name="Jeff Timanus">twiz</who>
    <bug_when>2012-01-19 14:47:31 -0800</bug_when>
    <thetext>The current Ganesh texture cache is initialized to cache no more than 50 Mb of texture data.  For some demos this is too constrained.

See parallel tracking issue:  crbug.com/110468</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>539056</commentid>
    <comment_count>1</comment_count>
      <attachid>123201</attachid>
    <who name="Jeff Timanus">twiz</who>
    <bug_when>2012-01-19 14:52:13 -0800</bug_when>
    <thetext>Created attachment 123201
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>539277</commentid>
    <comment_count>2</comment_count>
      <attachid>123201</attachid>
    <who name="Vangelis Kokkevis">vangelis</who>
    <bug_when>2012-01-19 22:27:12 -0800</bug_when>
    <thetext>Comment on attachment 123201
Patch

I would feel more comfortable increasing the cache size if we were able to clear the cache when a tab is hidden like we do for the compositor.  In order to do that we may need to switch to using a shared graphics context per webview instead of renderer process or track how many tabs the renderer is dealing with and flush the cache when they are all hidden.

Alternatively, would it be possible to age textures in the cache so that we only evict ones that haven&apos;t been used for a while and use this texture limit as a soft limit that can be exceeded if more space is needed to keep the contents of a single frame?

Longer term we need to have a better strategy for doing global tracking of memory like nduca@ suggests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>539450</commentid>
    <comment_count>3</comment_count>
    <who name="Brian Salomon">bsalomon</who>
    <bug_when>2012-01-20 05:59:05 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 123201 [details])
&gt; I would feel more comfortable increasing the cache size if we were able to clear the cache when a tab is hidden like we do for the compositor.  In order to do that we may need to switch to using a shared graphics context per webview instead of renderer process or track how many tabs the renderer is dealing with and flush the cache when they are all hidden.
&gt; 
&gt; Alternatively, would it be possible to age textures in the cache so that we only evict ones that haven&apos;t been used for a while and use this texture limit as a soft limit that can be exceeded if more space is needed to keep the contents of a single frame?
&gt; 
&gt; Longer term we need to have a better strategy for doing global tracking of memory like nduca@ suggests.


We could make the cache size be a hard limit but periodically walk the cache and purge anything that hasn&apos;t been used in a while even when we are under-budget.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>541738</commentid>
    <comment_count>4</comment_count>
      <attachid>123201</attachid>
    <who name="Jeff Timanus">twiz</who>
    <bug_when>2012-01-24 14:56:53 -0800</bug_when>
    <thetext>Comment on attachment 123201
Patch

From the discussion we had offline today, I think we should let this patch through.

The plan is to introduce the capability of explicitly purging the Ganesh texture cache when all of the tabs associated with a render process have been backgrounded/hidden.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>544363</commentid>
    <comment_count>5</comment_count>
    <who name="Jeff Timanus">twiz</who>
    <bug_when>2012-01-27 14:24:32 -0800</bug_when>
    <thetext>Can a reviewer please have a look at this change, and mark it cq+?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>544427</commentid>
    <comment_count>6</comment_count>
      <attachid>123201</attachid>
    <who name="Stephen White">senorblanco</who>
    <bug_when>2012-01-27 15:21:47 -0800</bug_when>
    <thetext>Comment on attachment 123201
Patch

OK.  r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>544455</commentid>
    <comment_count>7</comment_count>
      <attachid>123201</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-01-27 15:42:19 -0800</bug_when>
    <thetext>Comment on attachment 123201
Patch

Clearing flags on attachment: 123201

Committed r106164: &lt;http://trac.webkit.org/changeset/106164&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>544456</commentid>
    <comment_count>8</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-01-27 15:42:24 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>123201</attachid>
            <date>2012-01-19 14:52:13 -0800</date>
            <delta_ts>2012-01-27 15:42:19 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-76666-20120119175211.patch</filename>
            <type>text/plain</type>
            <size>1628</size>
            <attacher name="Jeff Timanus">twiz</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJLaXQvY2hyb21pdW0vQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFNv
dXJjZS9XZWJLaXQvY2h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09PT09PT09PT09PT09PT09PT0K
LS0tIFNvdXJjZS9XZWJLaXQvY2hyb21pdW0vc3JjL0dyYXBoaWNzQ29udGV4dDNEQ2hyb21pdW0u
Y3BwCShyZXZpc2lvbiAxMDU0NDcpCisrKyBTb3VyY2UvV2ViS2l0L2Nocm9taXVtL3NyYy9HcmFw
aGljc0NvbnRleHQzRENocm9taXVtLmNwcAkod29ya2luZyBjb3B5KQpAQCAtMjEwLDcgKzIxMCw3
IEBAIEdyQ29udGV4dCogR3JhcGhpY3NDb250ZXh0M0RQcml2YXRlOjpnckMKICAgICAvLyBMaW1p
dCB0aGUgbnVtYmVyIG9mIHRleHR1cmVzIHdlIGhvbGQgaW4gdGhlIGJpdG1hcC0+dGV4dHVyZSBj
YWNoZS4KICAgICBzdGF0aWMgY29uc3QgaW50IG1heFRleHR1cmVDYWNoZUNvdW50ID0gNTEyOwog
ICAgIC8vIExpbWl0IHRoZSBieXRlcyBhbGxvY2F0ZWQgdG93YXJkIHRleHR1cmVzIGluIHRoZSBi
aXRtYXAtPnRleHR1cmUgY2FjaGUuCi0gICAgc3RhdGljIGNvbnN0IHNpemVfdCBtYXhUZXh0dXJl
Q2FjaGVCeXRlcyA9IDUwICogMTAyNCAqIDEwMjQ7CisgICAgc3RhdGljIGNvbnN0IHNpemVfdCBt
YXhUZXh0dXJlQ2FjaGVCeXRlcyA9IDk2ICogMTAyNCAqIDEwMjQ7CiAKICAgICBpZiAoIW1fZ3JD
b250ZXh0KSB7CiAgICAgICAgIFNrQXV0b1RVbnJlZjxHckdMSW50ZXJmYWNlPiBpbnRlcmZhY2Uo
bV9pbXBsLT5jcmVhdGVHckdMSW50ZXJmYWNlKCkpOwo=
</data>

          </attachment>
      

    </bug>

</bugzilla>