Closed Bug 1043603 Opened 10 years ago Closed 10 years ago

Expose tile pool size and pool shrink timeout as prefs

Categories

(Core :: Graphics: Layers, defect)

26 Branch
x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: milan, Assigned: milan)

References

Details

Attachments

(1 file, 1 obsolete file)

There is a maximum size for the display port (currently, 1.8x1.5 = 2.7x the display size), so there is a maximum number of tiles that would be used at any one time.  Perhaps we may want to have the maximum number of tiles in the pool be based on some aspects of the display?

Our current hardcoded maximum is 50.

Assuming 256x256 tiles, on a HVGA 320x480 device, we peak at 6x2=12 tiles, on Flame at 480x854, we peak at 10x2=20 tiles.

On a Retina Mac 2560x1600 we would peak at 56 with 512x512 tiles or 189 with 256x256 tiles.

We can already control the size of the tiles, probably should expose the size of the pool as well.
The calculation above isn't quite precise, it's assuming that we dump all the extra increase in the larger direction, but it's close (e.g., Flame could be 3x7=21, and since we're always aligning tiles to the origin, we're probably looking at 10x3=33 instead)
Attached patch Expose max tile pool size as a pref (obsolete) (deleted) β€” β€” Splinter Review
Attachment #8461930 - Flags: review?(chrislord.net)
Comment on attachment 8461930 [details] [diff] [review]
Expose max tile pool size as a pref

Review of attachment 8461930 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, don't know why this didn't occur to us before!

::: gfx/layers/client/TextureClientPool.h
@@ +93,5 @@
>    // shrinking).
>    static const uint32_t sMinCacheSize = 0;
>  
> +  gfx::SurfaceFormat mFormat;
> +  gfx::IntSize mSize;

nit - stick a new line after these, maybe add a comment for them if you're feeling particularly good-willed :)
Attachment #8461930 - Flags: review?(chrislord.net) → review+
One more item got requested as a pref, so I will combine it into this bug to save time - exposing the timeout values for when the pool starts shrinking.  The default for this is 1s for currently used tiling, but 3s for the "simple" tiling.  After this change, both are on the same preference, defaulting to 1s, so the behaviour for the simple tiling will change.
Summary: Expose tile pool size as a pref → Expose tile pool size and pool shrink timeout as prefs
Assignee: nobody → milan
Combine the two new prefs in the same patch.  Note that this changes the default for the simple tiling timeout from 3s to 1s.
Attachment #8461930 - Attachment is obsolete: true
Attachment #8462648 - Flags: review?(chrislord.net)
Comment on attachment 8462648 [details] [diff] [review]
Expose max tile pool size and pool shrink timeout as prefs

Review of attachment 8462648 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM.
Attachment #8462648 - Flags: review?(chrislord.net) → review+
https://tbpl.mozilla.org/?tree=Try&rev=fbcadf49f9e8
https://hg.mozilla.org/integration/mozilla-inbound/rev/46fffef9f33d
https://hg.mozilla.org/mozilla-central/rev/46fffef9f33d
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: