Flutter Engine
The Flutter Engine
common
graphics
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) : result_(static_result){};
18
19
bool
GLContextResult::GetResult
() {
20
return
result_
;
21
};
22
23
GLContextDefaultResult::GLContextDefaultResult
(
bool
static_result)
24
:
GLContextResult
(static_result){};
25
26
GLContextDefaultResult::~GLContextDefaultResult
() =
default
;
27
28
GLContextSwitch::GLContextSwitch
(std::unique_ptr<SwitchableGLContext> context)
29
: context_(
std
::move(context)) {
30
FML_CHECK
(context_ !=
nullptr
);
31
result_
= context_->SetCurrent();
32
};
33
34
GLContextSwitch::~GLContextSwitch
() {
35
context_->RemoveCurrent();
36
};
37
38
}
// namespace flutter
flutter::GLContextDefaultResult::GLContextDefaultResult
GLContextDefaultResult(bool static_result)
Definition:
gl_context_switch.cc:23
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:19
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:34
flutter::GLContextSwitch::GLContextSwitch
GLContextSwitch(std::unique_ptr< SwitchableGLContext > context)
Definition:
gl_context_switch.cc:28
flutter::SwitchableGLContext::~SwitchableGLContext
virtual ~SwitchableGLContext()
flutter::SwitchableGLContext::SwitchableGLContext
SwitchableGLContext()
FML_CHECK
#define FML_CHECK(condition)
Definition:
logging.h:85
flutter
Definition:
asset_manager.cc:10
std
Definition:
ref_ptr.h:256
Generated on Sun Jun 23 2024 21:54:54 for Flutter Engine by
1.9.4