#define USE_SYSTEM_ZLIB
#include "compression_utils_portable.h"
#include "libANGLE/MemoryProgramCache.h"
#include <GLSLANG/ShaderVars.h>
#include <anglebase/sha1.h>
#include "common/BinaryStream.h"
#include "common/angle_version_info.h"
#include "common/utilities.h"
#include "libANGLE/Context.h"
#include "libANGLE/Debug.h"
#include "libANGLE/Uniform.h"
#include "libANGLE/capture/FrameCapture.h"
#include "libANGLE/histogram_macros.h"
#include "libANGLE/renderer/ProgramImpl.h"
#include "platform/PlatformMethods.h"
namespace gl
{
namespace
{
static constexpr size_t kMaxUncompressedProgramSize = …;
void WriteProgramBindings(BinaryOutputStream *stream, const ProgramBindings &bindings)
{ … }
void WriteProgramAliasedBindings(BinaryOutputStream *stream, const ProgramAliasedBindings &bindings)
{ … }
}
MemoryProgramCache::MemoryProgramCache(egl::BlobCache &blobCache) : … { … }
MemoryProgramCache::~MemoryProgramCache() { … }
void MemoryProgramCache::ComputeHash(const Context *context,
const Program *program,
egl::BlobCache::Key *hashOut)
{ … }
angle::Result MemoryProgramCache::getProgram(const Context *context,
Program *program,
egl::BlobCache::Key *hashOut,
egl::CacheGetResult *resultOut)
{ … }
bool MemoryProgramCache::getAt(size_t index,
const egl::BlobCache::Key **hashOut,
egl::BlobCache::Value *programOut)
{ … }
void MemoryProgramCache::remove(const egl::BlobCache::Key &programHash)
{ … }
angle::Result MemoryProgramCache::putProgram(const egl::BlobCache::Key &programHash,
const Context *context,
Program *program)
{ … }
angle::Result MemoryProgramCache::updateProgram(const Context *context, Program *program)
{ … }
bool MemoryProgramCache::putBinary(const egl::BlobCache::Key &programHash,
const uint8_t *binary,
size_t length)
{ … }
void MemoryProgramCache::clear()
{ … }
void MemoryProgramCache::resize(size_t maxCacheSizeBytes)
{ … }
size_t MemoryProgramCache::entryCount() const
{ … }
size_t MemoryProgramCache::trim(size_t limit)
{ … }
size_t MemoryProgramCache::size() const
{ … }
size_t MemoryProgramCache::maxSize() const
{ … }
}