diff options
author | 2016-08-08 12:23:02 -0700 | |
---|---|---|
committer | 2016-08-08 12:23:02 -0700 | |
commit | 765b6e654802b770784becf3f53e5bd8beea4c9d (patch) | |
tree | 07e598fb54fc7514ed469823b30e76b045250f0d /src/core/SkLiteDL.h | |
parent | 84bca78ab462314ec48614ff50315f28d5467149 (diff) |
SkLiteDL: control reuse by a single parameter
This simply caps the number of times a display list can be reused.
As this number goes up, the average amount of memory we cache goes up
and the expected number of mallocs per SkLiteDL::New() goes down.
This strategy does not need a hard-coded cap on how many display lists
to cache, or how big they can grow.
TBR=herb@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2226813002
Review-Url: https://codereview.chromium.org/2226813002
Diffstat (limited to 'src/core/SkLiteDL.h')
-rw-r--r-- | src/core/SkLiteDL.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/SkLiteDL.h b/src/core/SkLiteDL.h index 132bc376c8..072672d7ef 100644 --- a/src/core/SkLiteDL.h +++ b/src/core/SkLiteDL.h @@ -85,6 +85,7 @@ private: void onDraw(SkCanvas*) override; SkLiteDL* fNext; + int fUsesRemaining; SkRect fBounds; SkTDArray<uint8_t> fBytes; }; |