Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
flow
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
TEST
#define TEST(S, s, D, expected)
Definition
FitsInTest.cpp:15
flutter::GLContextSwitch
Definition
gl_context_switch.h:94
flutter::testing::TestSwitchableGLContext::GetCurrentContext
static int GetCurrentContext()
Definition
gl_context_switch_test.cc:31
flutter
Definition
asset_manager.cc:10
Generated on Fri Apr 26 2024 06:14:03 for Flutter Engine by
1.9.8