5 #include "flutter/testing/testing.h"
6 #include "gtest/gtest.h"
8 #include "impeller/renderer/backend/gles/test/mock_gles.h"
17 class TestWorker :
public ReactorGLES::Worker {
19 bool CanReactorReactOnCurrentThreadNow(
20 const ReactorGLES& reactor)
const override {
27 auto mock_gles_impl = std::make_unique<MockGLESImpl>();
29 EXPECT_CALL(*mock_gles_impl, GenTextures(1, _)).Times(1);
31 std::shared_ptr<MockGLES> mock_gled =
32 MockGLES::Init(std::move(mock_gles_impl));
34 auto proc_table = std::make_unique<ProcTableGLES>(resolver);
35 auto worker = std::make_shared<TestWorker>();
36 auto reactor = std::make_shared<ReactorGLES>(std::move(proc_table));
37 reactor->AddWorker(worker);
constexpr bool IsDead() const
Determines if the handle is dead.
std::function< void *(const char *function_name)> Resolver
A unique handle to an OpenGL object. The collection of this handle scheduled the destruction of the a...
static UniqueHandleGLES MakeUntracked(std::shared_ptr< ReactorGLES > reactor, HandleType type)
const HandleGLES & Get() const
TEST(AllocationSizeTest, CanCreateTypedAllocations)