#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include <stddef.h>
#include <stdint.h>
#include <memory>
#include <vector>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "gpu/command_buffer/client/cmd_buffer_helper.h"
#include "gpu/command_buffer/client/command_buffer_direct_locked.h"
#include "gpu/command_buffer/service/mocks.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace gpu {
Return;
Mock;
Truly;
Sequence;
DoAll;
Invoke;
_;
const int32_t kTotalNumCommandEntries = …;
const int32_t kCommandBufferSizeBytes = …;
const int32_t kUnusedCommandId = …;
class CommandBufferHelperTest : public testing::Test { … };
TEST_F(CommandBufferHelperTest, TestCalcImmediateEntriesNoRingBuffer) { … }
TEST_F(CommandBufferHelperTest, TestCalcImmediateEntriesGetAtZero) { … }
TEST_F(CommandBufferHelperTest, TestCalcImmediateEntriesGetInMiddle) { … }
TEST_F(CommandBufferHelperTest, TestCalcImmediateEntriesGetBeforePut) { … }
TEST_F(CommandBufferHelperTest, TestCalcImmediateEntriesAutoFlushing) { … }
TEST_F(CommandBufferHelperTest,
TestCalcImmediateEntriesAutoFlushingOrderingBarrier) { … }
TEST_F(CommandBufferHelperTest, TestCalcImmediateEntriesOverFlushLimit) { … }
TEST_F(CommandBufferHelperTest, TestCommandProcessing) { … }
TEST_F(CommandBufferHelperTest, TestCommandWrapping) { … }
TEST_F(CommandBufferHelperTest, TestCommandWrappingExactMultiple) { … }
TEST_F(CommandBufferHelperTest, TestCommandWrappingFullAtStart) { … }
TEST_F(CommandBufferHelperTest, TestCommandWrappingFullInMiddle) { … }
TEST_F(CommandBufferHelperTest, TestCommandWrappingFullAtEnd) { … }
TEST_F(CommandBufferHelperTest, TestAvailableEntries) { … }
TEST_F(CommandBufferHelperTest, TestToken) { … }
TEST_F(CommandBufferHelperTest, TestWaitForTokenFlush) { … }
TEST_F(CommandBufferHelperTest, FreeRingBuffer) { … }
TEST_F(CommandBufferHelperTest, Noop) { … }
TEST_F(CommandBufferHelperTest, IsContextLost) { … }
TEST_F(CommandBufferHelperTest, TestFlushGeneration) { … }
TEST_F(CommandBufferHelperTest, TestOrderingBarrierFlushGeneration) { … }
TEST_F(CommandBufferHelperTest, TestFlushToCommandBuffer) { … }
TEST_F(CommandBufferHelperTest, TestOrderingBarrierToCommandBuffer) { … }
TEST_F(CommandBufferHelperTest, TestWrapAroundAfterOrderingBarrier) { … }
}