#include "components/viz/service/display_embedder/buffer_queue.h"
#include <stddef.h>
#include <stdint.h>
#include <memory>
#include <set>
#include <string>
#include <string_view>
#include <utility>
#include "base/test/bind.h"
#include "build/build_config.h"
#include "components/viz/test/fake_skia_output_surface.h"
#include "gpu/command_buffer/common/mailbox.h"
#include "gpu/command_buffer/common/shared_image_usage.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
_;
Contains;
Expectation;
Ne;
Not;
Return;
namespace viz {
namespace {
constexpr SharedImageFormat kBufferQueueFormat = …;
constexpr gfx::ColorSpace kBufferQueueColorSpace = …;
}
#if BUILDFLAG(IS_WIN)
const gpu::SurfaceHandle kFakeSurfaceHandle =
reinterpret_cast<gpu::SurfaceHandle>(1);
#else
const gpu::SurfaceHandle kFakeSurfaceHandle = …;
#endif
class BufferQueueTest : public ::testing::Test { … };
const gfx::Size screen_size = …;
const gfx::Rect screen_rect = …;
const gfx::Rect small_damage = …;
const gfx::Rect large_damage = …;
const gfx::Rect overlapping_damage = …;
class MockedSkiaOutputSurface : public FakeSkiaOutputSurface { … };
TEST(BufferQueueStandaloneTest, BufferCreationAndDestruction) { … }
TEST_F(BufferQueueTest, PartialSwapReuse) { … }
TEST_F(BufferQueueTest, PartialSwapFullFrame) { … }
TEST_F(BufferQueueTest, PartialSwapWithTripleBuffering) { … }
TEST_F(BufferQueueTest, PartialSwapOverlapping) { … }
TEST_F(BufferQueueTest, MultipleGetCurrentBufferCalls) { … }
TEST_F(BufferQueueTest, CheckDoubleBuffering) { … }
TEST_F(BufferQueueTest, CheckTripleBuffering) { … }
TEST_F(BufferQueueTest, CheckEmptySwap) { … }
TEST_F(BufferQueueTest, CheckCorrectBufferOrdering) { … }
TEST_F(BufferQueueTest, ReshapeWithInFlightBuffers) { … }
TEST_F(BufferQueueTest, SwapAfterReshape) { … }
TEST_F(BufferQueueTest, SwapBuffersSkipped) { … }
TEST_F(BufferQueueTest, EnsureMinNumberOfBuffers) { … }
TEST_F(BufferQueueTest, GetLastSwappedBuffer) { … }
TEST_F(BufferQueueTest, RecreateBuffers) { … }
TEST_F(BufferQueueTest, DestroyBuffers) { … }
TEST_F(BufferQueueTest, SetPurgeable) { … }
TEST_F(BufferQueueTest, SetPurgeableThenReshape) { … }
}