#include "cc/test/transfer_cache_test_helper.h"
#include <memory>
#include <utility>
#include "base/check.h"
#include "base/containers/contains.h"
#include "base/containers/heap_array.h"
#include "base/containers/span.h"
namespace cc {
TransferCacheTestHelper::TransferCacheTestHelper(GrDirectContext* context)
: … { … }
TransferCacheTestHelper::~TransferCacheTestHelper() = default;
bool TransferCacheTestHelper::LockEntryDirect(const EntryKey& key) { … }
void TransferCacheTestHelper::CreateEntryDirect(const EntryKey& key,
base::span<uint8_t> data) { … }
void TransferCacheTestHelper::CreateLocalEntry(
uint32_t id,
std::unique_ptr<ServiceTransferCacheEntry> entry) { … }
void TransferCacheTestHelper::UnlockEntriesDirect(
const std::vector<EntryKey>& keys) { … }
void TransferCacheTestHelper::DeleteEntryDirect(const EntryKey& key) { … }
void TransferCacheTestHelper::SetGrContext(GrDirectContext* context) { … }
void TransferCacheTestHelper::SetCachedItemsLimit(size_t limit) { … }
ServiceTransferCacheEntry* TransferCacheTestHelper::GetEntryInternal(
TransferCacheEntryType type,
uint32_t id) { … }
bool TransferCacheTestHelper::LockEntryInternal(const EntryKey& key) { … }
uint32_t TransferCacheTestHelper::CreateEntryInternal(
const ClientTransferCacheEntry& client_entry,
uint8_t* memory) { … }
void TransferCacheTestHelper::FlushEntriesInternal(std::set<EntryKey> keys) { … }
void TransferCacheTestHelper::EnforceLimits() { … }
}