#include "gpu/command_buffer/service/service_discardable_manager.h"
#include <memory>
#include "base/memory/raw_ptr.h"
#include "gpu/command_buffer/client/client_test_helper.h"
#include "gpu/command_buffer/service/gles2_cmd_decoder_mock.h"
#include "gpu/command_buffer/service/gpu_service_test.h"
#include "gpu/command_buffer/service/gpu_tracer.h"
#include "gpu/command_buffer/service/memory_tracking.h"
#include "gpu/command_buffer/service/mocks.h"
#include "gpu/command_buffer/service/shared_image/shared_image_manager.h"
#include "gpu/command_buffer/service/test_helper.h"
#include "gpu/command_buffer/service/texture_manager.h"
#include "gpu/config/gpu_preferences.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gl/gl_mock.h"
#include "ui/gl/gl_switches.h"
Pointee;
_;
Invoke;
Mock;
InSequence;
namespace gpu {
namespace gles2 {
namespace {
void CreateLockedHandlesForTesting(
std::unique_ptr<ServiceDiscardableHandle>* service_handle,
std::unique_ptr<ClientDiscardableHandle>* client_handle) { … }
ServiceDiscardableHandle CreateLockedServiceHandleForTesting() { … }
class MockDestructionObserver : public TextureManager::DestructionObserver { … };
static const uint32_t kSmallTextureDim = …;
static const size_t kSmallTextureSize = …;
}
class ServiceDiscardableManagerTest : public GpuServiceTest { … };
TEST_F(ServiceDiscardableManagerTest, BasicUsage) { … }
TEST_F(ServiceDiscardableManagerTest, DeleteAtShutdown) { … }
TEST_F(ServiceDiscardableManagerTest, UnlockInvalid) { … }
TEST_F(ServiceDiscardableManagerTest, Limits) { … }
TEST_F(ServiceDiscardableManagerTest, TextureSizeChanged) { … }
TEST_F(ServiceDiscardableManagerTest, OwnershipOnUnlock) { … }
TEST_F(ServiceDiscardableManagerTest, BindGeneratedTextureLock) { … }
TEST_F(ServiceDiscardableManagerTest, BindGeneratedTextureInitialization) { … }
TEST_F(ServiceDiscardableManagerTest, BindGeneratedTextureSizeChange) { … }
TEST_F(ServiceDiscardableManagerTest, MemoryPressure) { … }
}
}