#include "gpu/command_buffer/service/shared_image/shared_image_manager.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/trace_event/memory_allocator_dump.h"
#include "base/trace_event/process_memory_dump.h"
#include "gpu/command_buffer/common/mailbox.h"
#include "gpu/command_buffer/common/shared_image_usage.h"
#include "gpu/command_buffer/service/shared_image/shared_image_backing.h"
#include "gpu/command_buffer/service/shared_image/shared_image_representation.h"
#include "gpu/command_buffer/service/shared_image/test_image_backing.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/color_space.h"
namespace gpu {
namespace {
std::unique_ptr<TestImageBacking> CreateImageBacking(size_t size_in_bytes) { … }
TEST(SharedImageManagerTest, BasicRefCounting) { … }
TEST(SharedImageManagerTest, MemoryDumps) { … }
TEST(SharedImageManagerTest, TransferRefSameTracker) { … }
TEST(SharedImageManagerTest, TransferRefNewTracker) { … }
class SequenceValidatingMemoryTracker : public MemoryTracker { … };
TEST(SharedImageManagerTest, TransferRefCrossThread) { … }
TEST(SharedImageManagerTest, GetUsageForMailbox) { … }
}
}