| Index: media/blink/multibuffer.h
|
| diff --git a/media/blink/multibuffer.h b/media/blink/multibuffer.h
|
| index cecca4a2c2f988328607a4a26def8620bec9a91f..61a3a7ed5783f5edadf77edf4755542eba3a506e 100644
|
| --- a/media/blink/multibuffer.h
|
| +++ b/media/blink/multibuffer.h
|
| @@ -137,6 +137,9 @@ class MEDIA_BLINK_EXPORT MultiBuffer {
|
| // Virtual for testing purposes.
|
| void Prune(int64_t max_to_free);
|
|
|
| + // Returns true if some blocks are prunable.
|
| + bool Pruneable() const;
|
| +
|
| void IncrementDataSize(int64_t blocks);
|
| void IncrementMaxSize(int64_t blocks);
|
|
|
| @@ -151,12 +154,21 @@ class MEDIA_BLINK_EXPORT MultiBuffer {
|
| friend class base::RefCounted<GlobalLRU>;
|
| ~GlobalLRU();
|
|
|
| + // Schedule background pruning, if needed.
|
| + void SchedulePrune();
|
| +
|
| + // Perform background pruning.
|
| + void PruneTask();
|
| +
|
| // Max number of blocks.
|
| int64_t max_size_;
|
|
|
| // Sum of all multibuffer::data_.size().
|
| int64_t data_size_;
|
|
|
| + // True if there is a call to the background pruning outstanding.
|
| + bool background_pruning_active_;
|
| +
|
| // The LRU should contain all blocks which are not pinned from
|
| // all multibuffers.
|
| LRU<GlobalBlockId> lru_;
|
|
|