Flutter Engine
Loading...
Searching...
No Matches
gl_context_switch_unittests.cc
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#define FML_USED_ON_EMBEDDER
6
7
#include "
flutter/common/graphics/gl_context_switch.h
"
8
9
#include <functional>
10
#include <future>
11
#include <memory>
12
13
#include "
flutter/flow/testing/gl_context_switch_test.h
"
14
#include "gtest/gtest.h"
15
16
namespace
flutter
{
17
namespace
testing {
18
19
TEST
(GLContextSwitchTest, SwitchKeepsContextCurrentWhileInScope) {
20
{
21
auto
test_gl_context = std::make_unique<TestSwitchableGLContext>(0);
22
auto
context_switch =
GLContextSwitch
(std::move(test_gl_context));
23
ASSERT_EQ(
TestSwitchableGLContext::GetCurrentContext
(), 0);
24
}
25
ASSERT_EQ(
TestSwitchableGLContext::GetCurrentContext
(), -1);
26
}
27
28
}
// namespace testing
29
}
// namespace flutter
flutter::GLContextSwitch
Definition
gl_context_switch.h:94
flutter::testing::TestSwitchableGLContext::GetCurrentContext
static int GetCurrentContext()
Definition
gl_context_switch_test.cc:31
gl_context_switch.h
gl_context_switch_test.h
flutter::testing::TEST
TEST(NativeAssetsManagerTest, NoAvailableAssets)
Definition
native_assets_unittests.cc:68
flutter
Definition
asset_manager.cc:10
flow
gl_context_switch_unittests.cc
Generated on Thu Nov 6 2025 16:11:21 for Flutter Engine by
1.9.8