chromium/gpu/command_buffer/service/gr_shader_cache_unittest.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "gpu/command_buffer/service/gr_shader_cache.h"

#include <thread>

#include "base/base64.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace gpu {
namespace raster {
namespace {
constexpr char kShaderKey[] =;
constexpr char kShader[] =;
constexpr size_t kCacheLimit =;

}  // namespace

class GrShaderCacheTest : public GrShaderCache::Client, public testing::Test {};

TEST_F(GrShaderCacheTest, DoesNotCacheForIncognito) {}

TEST_F(GrShaderCacheTest, LoadedFromDisk) {}

TEST_F(GrShaderCacheTest, EnforcesLimits) {}

TEST_F(GrShaderCacheTest, MemoryPressure) {}

TEST_F(GrShaderCacheTest, StoringSameEntry) {}

TEST_F(GrShaderCacheTest, PopulateFromDiskAfterStoring) {}

// This test creates GrShaderCache::ScopedCacheUse object from 2 different
// thread which exists together. In a non thread safe GrShaderCache, this will
// hit DCHECKS in ScopedCacheUse::ScopedCacheUse() since the current_client_id
// already exists from 1st object. In a thread safe model, it will not hit
// DCHECKS.
TEST_F(GrShaderCacheTest, MultipleThreadsUsingSameCache) {}

}  // namespace raster
}  // namespace gpu