chromium/gpu/command_buffer/client/raster_implementation_unittest.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

// Tests for RasterImplementation.

#include "gpu/command_buffer/client/raster_implementation.h"

#include <GLES2/gl2.h>
#include <GLES2/gl2extchromium.h>
#include <stddef.h>
#include <stdint.h>

#include <memory>

#include "base/compiler_specific.h"
#include "base/containers/heap_array.h"
#include "base/functional/bind.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "cc/paint/raw_memory_transfer_cache_entry.h"
#include "cc/paint/transfer_cache_serialize_helper.h"
#include "gpu/command_buffer/client/client_test_helper.h"
#include "gpu/command_buffer/client/mock_transfer_buffer.h"
#include "gpu/command_buffer/client/query_tracker.h"
#include "gpu/command_buffer/client/raster_cmd_helper.h"
#include "gpu/command_buffer/client/ring_buffer.h"
#include "gpu/command_buffer/client/shared_memory_limits.h"
#include "gpu/command_buffer/client/transfer_buffer.h"
#include "gpu/command_buffer/common/command_buffer.h"
#include "gpu/command_buffer/common/sync_token.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

QueryTracker;
_;
AtLeast;
AnyNumber;
DoAll;
InSequence;
Invoke;
Mock;
Sequence;
StrictMock;
Return;
ReturnRef;

namespace gpu {
namespace raster {

ACTION_P2(SetMemory, dst, obj) {}

ACTION_P3(SetMemoryFromArray, dst, array, size) {}

// Used to help set the transfer buffer result to SizedResult of a single value.
template <typename T>
class SizedResultHelper {};

class RasterImplementationTest : public testing::Test {};

void RasterImplementationTest::SetUp() {}

void RasterImplementationTest::TearDown() {}

class RasterImplementationManualInitTest : public RasterImplementationTest {};

const uint8_t RasterImplementationTest::kInitialValue;
const uint32_t RasterImplementationTest::kNumCommandEntries;
const uint32_t RasterImplementationTest::kCommandBufferSizeBytes;
const uint32_t RasterImplementationTest::kTransferBufferSize;
const GLint RasterImplementationTest::kMaxTextureSize;
const GLuint RasterImplementationTest::kStartId;
const GLuint RasterImplementationTest::kBuffersStartId;
const GLuint RasterImplementationTest::kTexturesStartId;
const GLuint RasterImplementationTest::kQueriesStartId;

TEST_F(RasterImplementationTest, GetBucketContents) {}

TEST_F(RasterImplementationTest, BeginEndQueryEXT) {}

TEST_F(RasterImplementationManualInitTest, BadQueryTargets) {}

TEST_F(RasterImplementationTest, GenUnverifiedSyncTokenCHROMIUM) {}

TEST_F(RasterImplementationTest, VerifySyncTokensCHROMIUM) {}

TEST_F(RasterImplementationTest, VerifySyncTokensCHROMIUM_Sequence) {}

TEST_F(RasterImplementationTest, VerifySyncTokensCHROMIUM_EmptySyncToken) {}

TEST_F(RasterImplementationTest, WaitSyncTokenCHROMIUM) {}

TEST_F(RasterImplementationTest, WaitSyncTokenCHROMIUMErrors) {}

static void CountCallback(int* count) {}

TEST_F(RasterImplementationTest, SignalSyncToken) {}

TEST_F(RasterImplementationTest, SignalSyncTokenAfterContextLoss) {}

TEST_F(RasterImplementationTest, ReportLoss) {}

TEST_F(RasterImplementationTest, ReportLossReentrant) {}

TEST_F(RasterImplementationManualInitTest, FailInitOnTransferBufferFail) {}

TEST_F(RasterImplementationTest, TransferCacheSerialization) {}

TEST_F(RasterImplementationTest, SetActiveURLCHROMIUM) {}

#include "gpu/command_buffer/client/raster_implementation_unittest_autogen.h"

}  // namespace raster
}  // namespace gpu