chromium/components/viz/service/display_embedder/buffer_queue_unittest.cc

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

#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 =;

}  // namespace

#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) {}

// Make sure that each time we swap buffers, the damage gets propagated to the
// previously swapped buffers.
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) {}

}  // namespace viz