Flutter Engine
Loading...
Searching...
No Matches
gl_context_switch.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
#include "
flutter/common/graphics/gl_context_switch.h
"
6
7
namespace
flutter
{
8
9
SwitchableGLContext::SwitchableGLContext
() =
default
;
10
11
SwitchableGLContext::~SwitchableGLContext
() =
default
;
12
13
GLContextResult::GLContextResult
() =
default
;
14
15
GLContextResult::~GLContextResult
() =
default
;
16
17
GLContextResult::GLContextResult
(
bool
static_result)
18
: result_(static_result) {};
19
20
bool
GLContextResult::GetResult
() {
21
return
result_
;
22
};
23
24
GLContextDefaultResult::GLContextDefaultResult
(
bool
static_result)
25
:
GLContextResult
(static_result) {};
26
27
GLContextDefaultResult::~GLContextDefaultResult
() =
default
;
28
29
GLContextSwitch::GLContextSwitch
(std::unique_ptr<SwitchableGLContext> context)
30
: context_(
std
::move(context)) {
31
FML_CHECK
(context_ !=
nullptr
);
32
result_
= context_->SetCurrent();
33
};
34
35
GLContextSwitch::~GLContextSwitch
() {
36
context_->RemoveCurrent();
37
};
38
39
}
// namespace flutter
flutter::GLContextDefaultResult::GLContextDefaultResult
GLContextDefaultResult(bool static_result)
Definition
gl_context_switch.cc:24
flutter::GLContextDefaultResult::~GLContextDefaultResult
~GLContextDefaultResult() override
flutter::GLContextResult
Definition
gl_context_switch.h:50
flutter::GLContextResult::GLContextResult
GLContextResult()
flutter::GLContextResult::GetResult
bool GetResult()
Definition
gl_context_switch.cc:20
flutter::GLContextResult::~GLContextResult
virtual ~GLContextResult()
flutter::GLContextResult::result_
bool result_
Definition
gl_context_switch.h:61
flutter::GLContextSwitch::~GLContextSwitch
~GLContextSwitch() override
Definition
gl_context_switch.cc:35
flutter::GLContextSwitch::GLContextSwitch
GLContextSwitch(std::unique_ptr< SwitchableGLContext > context)
Definition
gl_context_switch.cc:29
flutter::SwitchableGLContext::~SwitchableGLContext
virtual ~SwitchableGLContext()
flutter::SwitchableGLContext::SwitchableGLContext
SwitchableGLContext()
FML_CHECK
#define FML_CHECK(condition)
Definition
logging.h:104
gl_context_switch.h
flutter
Definition
asset_manager.cc:10
std
Definition
ref_ptr.h:261
common
graphics
gl_context_switch.cc
Generated on Thu Nov 6 2025 16:11:21 for Flutter Engine by
1.9.8