#include "test_utils/ANGLETest.h"
#include <map>
#include <vector>
#include "common/PackedEnums.h"
#include "common/angleutils.h"
#include "test_utils/ANGLETest.h"
#include "test_utils/MultiThreadSteps.h"
#include "test_utils/gl_raii.h"
#include "util/EGLWindow.h"
#include "util/test_utils.h"
usingnamespaceangle;
constexpr char kEGLExtName[] = …;
enum class CacheOpResult
{ … };
angle::PackedEnumMap<CacheOpResult, std::string> kCacheOpToString = …;
std::ostream &operator<<(std::ostream &os, CacheOpResult result)
{ … }
namespace
{
std::map<std::vector<uint8_t>, std::vector<uint8_t>> gApplicationCache;
CacheOpResult gLastCacheOpResult = …;
void SetBlob(const void *key, EGLsizeiANDROID keySize, const void *value, EGLsizeiANDROID valueSize)
{ … }
void SetCorruptedBlob(const void *key,
EGLsizeiANDROID keySize,
const void *value,
EGLsizeiANDROID valueSize)
{ … }
EGLsizeiANDROID GetBlob(const void *key,
EGLsizeiANDROID keySize,
void *value,
EGLsizeiANDROID valueSize)
{ … }
void WaitProgramBinaryReady(GLuint program)
{ … }
}
class EGLBlobCacheTest : public ANGLETest<>
{ … };
TEST_P(EGLBlobCacheTest, Functional)
{ … }
TEST_P(EGLBlobCacheTest, FunctionalWithoutWait)
{ … }
TEST_P(EGLBlobCacheTest, NegativeAPI)
{ … }
TEST_P(EGLBlobCacheTest, FragmentOutputLocationKey)
{ … }
TEST_P(EGLBlobCacheTest, ShaderCacheFunctional)
{ … }
TEST_P(EGLBlobCacheTest, ThreadSafety)
{ … }
TEST_P(EGLBlobCacheTest, CacheCorruption)
{ … }
class EGLBlobCacheInternalRejectionTest : public EGLBlobCacheTest
{ … };
TEST_P(EGLBlobCacheInternalRejectionTest, Functional)
{ … }
TEST_P(EGLBlobCacheInternalRejectionTest, ShaderCacheFunctional)
{ … }
ANGLE_INSTANTIATE_TEST(…);
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(…);
ANGLE_INSTANTIATE_TEST(…);